diff options
author | mmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-04-07 20:43:49 +0000 |
---|---|---|
committer | mmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-04-07 20:43:49 +0000 |
commit | fe5bbddb30456e7d51dd9e144d38a7d4006d84e2 (patch) | |
tree | 8d6e3b5701dcf27020d1411821a3b136a9010ace /main/manager.c | |
parent | 9aee8fa9344382fc579c652c527bff94e72c4630 (diff) |
Ensure that \r\n is printed after the ActionID in an OriginateResponse.
(closes issue #14847)
Reported by: kobaz
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@186719 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/manager.c')
-rw-r--r-- | main/manager.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/main/manager.c b/main/manager.c index e88af7f98..6ed6a75c6 100644 --- a/main/manager.c +++ b/main/manager.c @@ -1821,7 +1821,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" @@ -1831,7 +1831,8 @@ static void *fast_originate(void *data) "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 @@ 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)); |