Skip to content
Snippets Groups Projects
Commit eb930d5e authored by Tilghman Lesher's avatar Tilghman Lesher
Browse files

AsyncAGI should not close the manager session on error.

(closes issue #12370)
 Reported by: srt
 Patches: 
       asterisk-12370.diff uploaded by srt (license 378)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@112972 65c4cc65-6c06-0410-ace0-fbb531ad65f3
parent 75c6945d
Branches
Tags
No related merge requests found
...@@ -340,13 +340,13 @@ static int action_add_agi_cmd(struct mansession *s, const struct message *m) ...@@ -340,13 +340,13 @@ static int action_add_agi_cmd(struct mansession *s, const struct message *m)
if (!chan) { if (!chan) {
snprintf(buf, sizeof(buf), "Channel %s does not exists or cannot get its lock", channel); snprintf(buf, sizeof(buf), "Channel %s does not exists or cannot get its lock", channel);
astman_send_error(s, m, buf); astman_send_error(s, m, buf);
return 1; return 0;
} }
if (add_agi_cmd(chan, cmdbuff, cmdid)) { if (add_agi_cmd(chan, cmdbuff, cmdid)) {
snprintf(buf, sizeof(buf), "Failed to add AGI command to channel %s queue", chan->name); snprintf(buf, sizeof(buf), "Failed to add AGI command to channel %s queue", chan->name);
astman_send_error(s, m, buf); astman_send_error(s, m, buf);
ast_channel_unlock(chan); ast_channel_unlock(chan);
return 1; return 0;
} }
astman_send_ack(s, m, "Added AGI command to queue"); astman_send_ack(s, m, "Added AGI command to queue");
ast_channel_unlock(chan); ast_channel_unlock(chan);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment