[asterisk-commits] rmudgett: trunk r398574 - in /trunk: ./ main/core_local.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Sep 6 15:21:23 CDT 2013


Author: rmudgett
Date: Fri Sep  6 15:21:21 2013
New Revision: 398574

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=398574
Log:
core_local: Fix LocalOptimizationBegin AMI event missing Source channel snapshot.

* Fix the LocalOptimizationBegin AMI event by eliminating an artificial
buffer size limitation that is too small anyway.
........

Merged revisions 398572 from http://svn.asterisk.org/svn/asterisk/branches/12

Modified:
    trunk/   (props changed)
    trunk/main/core_local.c

Propchange: trunk/
------------------------------------------------------------------------------
--- branch-12-merged (original)
+++ branch-12-merged Fri Sep  6 15:21:21 2013
@@ -1,1 +1,1 @@
-/branches/12:1-398198,398206,398215,398226,398237,398283,398286,398299,398303,398368,398381,398418,398458,398498,398511,398521,398533,398562
+/branches/12:1-398198,398206,398215,398226,398237,398283,398286,398299,398303,398368,398381,398418,398458,398498,398511,398521,398533,398562,398572

Modified: trunk/main/core_local.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/core_local.c?view=diff&rev=398574&r1=398573&r2=398574
==============================================================================
--- trunk/main/core_local.c (original)
+++ trunk/main/core_local.c Fri Sep  6 15:21:21 2013
@@ -422,7 +422,7 @@
 	struct ast_channel_snapshot *local_snapshot_two;
 	RAII_VAR(struct ast_str *, local_channel_one, NULL, ast_free);
 	RAII_VAR(struct ast_str *, local_channel_two, NULL, ast_free);
-	struct ast_str *event_buffer = ast_str_alloca(128);
+	RAII_VAR(struct ast_str *, event_buffer, NULL, ast_free);
 	const char *event;
 
 	local_snapshot_one = ast_multi_channel_blob_get_channel(obj, "1");
@@ -431,9 +431,10 @@
 		return NULL;
 	}
 
+	event_buffer = ast_str_create(1024);
 	local_channel_one = ast_manager_build_channel_state_string_prefix(local_snapshot_one, "LocalOne");
 	local_channel_two = ast_manager_build_channel_state_string_prefix(local_snapshot_two, "LocalTwo");
-	if (!local_channel_one || !local_channel_two) {
+	if (!event_buffer || !local_channel_one || !local_channel_two) {
 		return NULL;
 	}
 




More information about the asterisk-commits mailing list