[asterisk-commits] oej: branch oej/tilghman-chanvar-backport r222099 - /team/oej/tilghman-chanva...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Oct 2 14:35:25 CDT 2009


Author: oej
Date: Fri Oct  2 14:35:22 2009
New Revision: 222099

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=222099
Log:
I hate backporting. Waste of time. 

Modified:
    team/oej/tilghman-chanvar-backport/main/channel.c
    team/oej/tilghman-chanvar-backport/main/manager.c

Modified: team/oej/tilghman-chanvar-backport/main/channel.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/tilghman-chanvar-backport/main/channel.c?view=diff&rev=222099&r1=222098&r2=222099
==============================================================================
--- team/oej/tilghman-chanvar-backport/main/channel.c (original)
+++ team/oej/tilghman-chanvar-backport/main/channel.c Fri Oct  2 14:35:22 2009
@@ -881,7 +881,7 @@
 	 * a lot of data into this func to do it here!
 	 */
 	if (!ast_strlen_zero(name_fmt)) {
-		ast_channel_manager_event(chan, NULL, EVENT_FLAG_CALL, "Newchannel",
+		ast_channel_manager_event(tmp, NULL, EVENT_FLAG_CALL, "Newchannel",
 		      "Channel: %s\r\n"
 		      "State: %s\r\n"
 		      "CallerIDNum: %s\r\n"
@@ -3842,8 +3842,8 @@
 	ast_string_field_set(clone, name, masqn);
 	
 	/* Notify any managers of the change, first the masq then the other */
-	ast_channel_manager_event(chan, NULL, EVENT_FLAG_CALL, "Rename", "Oldname: %s\r\nNewname: %s\r\nUniqueid: %s\r\n", newn, masqn, clone->uniqueid);
-	ast_channel_manager_event(chan, NULL, EVENT_FLAG_CALL, "Rename", "Oldname: %s\r\nNewname: %s\r\nUniqueid: %s\r\n", orig, newn, original->uniqueid);
+	ast_channel_manager_event(clone, NULL, EVENT_FLAG_CALL, "Rename", "Oldname: %s\r\nNewname: %s\r\nUniqueid: %s\r\n", newn, masqn, clone->uniqueid);
+	ast_channel_manager_event(original, NULL, EVENT_FLAG_CALL, "Rename", "Oldname: %s\r\nNewname: %s\r\nUniqueid: %s\r\n", orig, newn, original->uniqueid);
 
 	/* Swap the technologies */	
 	t = original->tech;
@@ -3932,7 +3932,7 @@
 	snprintf(zombn, sizeof(zombn), "%s<ZOMBIE>", orig);
 	/* Mangle the name of the clone channel */
 	ast_string_field_set(clone, name, zombn);
-	ast_channel_manager_event(chan, NULL, EVENT_FLAG_CALL, "Rename", "Oldname: %s\r\nNewname: %s\r\nUniqueid: %s\r\n", masqn, zombn, clone->uniqueid);
+	ast_channel_manager_event(clone, NULL, EVENT_FLAG_CALL, "Rename", "Oldname: %s\r\nNewname: %s\r\nUniqueid: %s\r\n", masqn, zombn, clone->uniqueid);
 
 	/* Update the type. */
 	t_pvt = original->monitor;

Modified: team/oej/tilghman-chanvar-backport/main/manager.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/tilghman-chanvar-backport/main/manager.c?view=diff&rev=222099&r1=222098&r2=222099
==============================================================================
--- team/oej/tilghman-chanvar-backport/main/manager.c (original)
+++ team/oej/tilghman-chanvar-backport/main/manager.c Fri Oct  2 14:35:22 2009
@@ -129,7 +129,7 @@
 #define ASTMAN_APPEND_BUF_INITSIZE   256
 
 	
-AST_THREADSTORAGE(manager_event_funcbuf);
+AST_THREADSTORAGE(manager_event_buf, manager_event_funcbuf);
 
 static struct permalias {
 	int num;
@@ -262,14 +262,14 @@
 static struct manager_action *first_action;
 AST_RWLOCK_DEFINE_STATIC(actionlock);
 
-static void append_channel_vars(struct ast_str **pbuf, struct ast_channel *chan)
+static void append_channel_vars(struct ast_dynamic_str **pbuf, struct ast_channel *chan)
 {
 	struct manager_channel_variable *var;
 	AST_RWLIST_RDLOCK(&channelvars);
 	AST_LIST_TRAVERSE(&channelvars, var, entry) {
 		const char *val = "";
 		if (var->isfunc) {
-			struct ast_str *res = ast_str_thread_get(&manager_event_funcbuf, 16);
+			struct ast_dynamic_str *res = ast_dynamic_str_thread_get(&manager_event_funcbuf, 16);
 			int ret;
 			if (res && (ret = ast_func_read2(chan, var->name, &res, 0)) == 0) {
 				val = ast_str_buffer(res);
@@ -277,7 +277,7 @@
 		} else {
 			val = pbx_builtin_getvar_helper(chan, var->name);
 		}
-		ast_str_append(pbuf, 0, "ChanVariable(%s): %s=%s\r\n", chan->name, var->name, val ? val : "");
+		ast_dynamic_str_append(pbuf, 0, "ChanVariable(%s): %s=%s\r\n", chan->name, var->name, val ? val : "");
 	}
 	AST_RWLIST_UNLOCK(&channelvars);
 }




More information about the asterisk-commits mailing list