[asterisk-commits] mmichelson: branch 1.4 r186719 - /branches/1.4/main/manager.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Apr 7 15:43:53 CDT 2009


Author: mmichelson
Date: Tue Apr  7 15:43:49 2009
New Revision: 186719

URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=186719
Log:
Ensure that \r\n is printed after the ActionID in an OriginateResponse.

(closes issue #14847)
Reported by: kobaz


Modified:
    branches/1.4/main/manager.c

Modified: branches/1.4/main/manager.c
URL: http://svn.digium.com/svn-view/asterisk/branches/1.4/main/manager.c?view=diff&rev=186719&r1=186718&r2=186719
==============================================================================
--- branches/1.4/main/manager.c (original)
+++ branches/1.4/main/manager.c Tue Apr  7 15:43:49 2009
@@ -1821,7 +1821,7 @@
 		snprintf(requested_channel, AST_CHANNEL_NAME, "%s/%s", in->tech, in->data);	
 	/* Tell the manager what happened with the channel */
 	manager_event(EVENT_FLAG_CALL, "OriginateResponse",
-		"%s"
+		"%s%s"
 		"Response: %s\r\n"
 		"Channel: %s\r\n"
 		"Context: %s\r\n"
@@ -1831,7 +1831,8 @@
 		"CallerID: %s\r\n"		/* This parameter is deprecated and will be removed post-1.4 */
 		"CallerIDNum: %s\r\n"
 		"CallerIDName: %s\r\n",
-		in->idtext, res ? "Failure" : "Success", chan ? chan->name : requested_channel, in->context, in->exten, reason, 
+		in->idtext, ast_strlen_zero(in->idtext) ? "" : "\r\n", res ? "Failure" : "Success", 
+		chan ? chan->name : requested_channel, in->context, in->exten, reason, 
 		chan ? chan->uniqueid : "<null>",
 		S_OR(in->cid_num, "<unknown>"),
 		S_OR(in->cid_num, "<unknown>"),
@@ -1931,7 +1932,7 @@
 			res = -1;
 		} else {
 			if (!ast_strlen_zero(id))
-				snprintf(fast->idtext, sizeof(fast->idtext), "ActionID: %s\r\n", id);
+				snprintf(fast->idtext, sizeof(fast->idtext), "ActionID: %s", id);
 			ast_copy_string(fast->tech, tech, sizeof(fast->tech));
    			ast_copy_string(fast->data, data, sizeof(fast->data));
 			ast_copy_string(fast->app, app, sizeof(fast->app));




More information about the asterisk-commits mailing list