[asterisk-commits] dlee: branch dlee/json_main r383327 - /team/dlee/json_main/main/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Mar 18 14:17:37 CDT 2013


Author: dlee
Date: Mon Mar 18 14:17:34 2013
New Revision: 383327

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=383327
Log:
For consistency with existing code, kept Exten: and deprecated Extension:

Modified:
    team/dlee/json_main/main/manager_channels.c

Modified: team/dlee/json_main/main/manager_channels.c
URL: http://svnview.digium.com/svn/asterisk/team/dlee/json_main/main/manager_channels.c?view=diff&rev=383327&r1=383326&r2=383327
==============================================================================
--- team/dlee/json_main/main/manager_channels.c (original)
+++ team/dlee/json_main/main/manager_channels.c Mon Mar 18 14:17:34 2013
@@ -74,12 +74,7 @@
 				</parameter>
 				<parameter name="Context">
 				</parameter>
-				<parameter name="Extension">
-				</parameter>
 				<parameter name="Exten">
-					<para>Deprecated in 12, but kept for
-					backward compatability. Please use
-					'Extension' instead.</para>
 				</parameter>
 				<parameter name="Priority">
 				</parameter>
@@ -140,7 +135,7 @@
 		"ConnectedLineName: %s\r\n"
 		"AccountCode: %s\r\n"
 		"Context: %s\r\n"
-		"Extension: %s\r\n"
+		"Exten: %s\r\n"
 		"Priority: %d\r\n"
 		"Uniqueid: %s\r\n"
 		"Cause: %d\r\n"
@@ -172,11 +167,16 @@
 	RAII_VAR(struct ast_str *, channel_event_string, NULL, ast_free);
 
 	/*** DOCUMENTATION
-	<managerEvent language="en_US" name="Newchannel">
+	<managerEvent language="en_US" name="Newexten">
 		<managerEventInstance>
 			<synopsis>Raised when a channel enters a new context, extension, priority.</synopsis>
 			<syntax>
 				<xi:include xpointer="xpointer(/docs/managerEvent[@name='Newchannel']/managerEventInstance/syntax/parameter)" />
+				<parameter name="Extension">
+					<para>Deprecated in 12, but kept for
+					backward compatability. Please use
+					'Exten' instead.</para>
+				</parameter>
 				<parameter name="Application">
 					<para>The application about to be executed.</para>
 				</parameter>
@@ -198,19 +198,20 @@
 		return;
 	}
 
+	/* DEPRECATED: Extension field deprecated in 12; remove in 14 */
 	manager_event(EVENT_FLAG_DIALPLAN, "Newexten",
 		      "%s"
+		      "Extension: %s\r\n"
 		      "Application: %s\r\n"
 		      "AppData: %s\r\n",
 		      ast_str_buffer(channel_event_string),
-		      snapshot->appl, snapshot->data);
+		      snapshot->exten, snapshot->appl, snapshot->data);
 }
 
 static void channel_snapshot_update(void *data, struct stasis_subscription *sub,
 				    struct stasis_topic *topic,
 				    struct stasis_message *message)
 {
-	RAII_VAR(struct ast_str *, extra_fields, ast_str_create(40), ast_free);
 	struct stasis_cache_update *update = stasis_message_data(message);
 	struct ast_channel_snapshot *old_snapshot;
 	struct ast_channel_snapshot *new_snapshot;
@@ -234,10 +235,6 @@
 
 	if (!old_snapshot) {
 		manager_event = "Newchannel";
-		/* DEPRECATED: Exten field deprecated in 12
-		 * remove in 14 */
-		ast_str_append(&extra_fields, 0, "Exten: %s\r\n",
-			       new_snapshot->exten);
 	}
 
 	if (old_snapshot && old_snapshot->state != new_snapshot->state) {
@@ -256,9 +253,8 @@
 			manager_build_channel_state_string(new_snapshot);
 
 		if (channel_event_string) {
-			manager_event(EVENT_FLAG_CALL, manager_event, "%s%s",
-				      ast_str_buffer(channel_event_string),
-				      ast_str_buffer(extra_fields));
+			manager_event(EVENT_FLAG_CALL, manager_event, "%s",
+				      ast_str_buffer(channel_event_string));
 		}
 	}
 




More information about the asterisk-commits mailing list