summaryrefslogtreecommitdiff
path: root/main/manager.c
diff options
context:
space:
mode:
authorMark Michelson <mmichelson@digium.com>2009-04-07 20:46:18 +0000
committerMark Michelson <mmichelson@digium.com>2009-04-07 20:46:18 +0000
commit4d42c73c554841a1e1d570406460b685960e6b9f (patch)
tree835fbf3d4e65b2c164b60f71a561102e3eeff065 /main/manager.c
parentc02b56f7bc35ea68b34f6dc433eae0791c1e5316 (diff)
Merged revisions 186719 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r186719 | mmichelson | 2009-04-07 15:43:49 -0500 (Tue, 07 Apr 2009) | 6 lines Ensure that \r\n is printed after the ActionID in an OriginateResponse. (closes issue #14847) Reported by: kobaz ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@186720 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/manager.c')
-rw-r--r--main/manager.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/main/manager.c b/main/manager.c
index 2220de224..8987034cd 100644
--- a/main/manager.c
+++ b/main/manager.c
@@ -2344,7 +2344,7 @@ static void *fast_originate(void *data)
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"
@@ -2353,7 +2353,8 @@ static void *fast_originate(void *data)
"Uniqueid: %s\r\n"
"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_name, "<unknown>")
@@ -2451,7 +2452,7 @@ static int action_originate(struct mansession *s, const struct message *m)
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));