summaryrefslogtreecommitdiff
path: root/res/res_agi.c
diff options
context:
space:
mode:
authorDavid M. Lee <dlee@digium.com>2013-12-05 22:10:20 +0000
committerDavid M. Lee <dlee@digium.com>2013-12-05 22:10:20 +0000
commit1212906351c3f4f5f759396c32b5e1dbabd403a4 (patch)
tree285c7eea05e3b246fe9560fae93d9d79dd5f2ad0 /res/res_agi.c
parentfc70db3a810dae81e0ba0e09ecf11468bbef4d54 (diff)
Reverting r403311. It's causing ARI tests to hang.
........ Merged revisions 403398 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403404 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res/res_agi.c')
-rw-r--r--res/res_agi.c12
1 files changed, 0 insertions, 12 deletions
diff --git a/res/res_agi.c b/res/res_agi.c
index 96d3906ac..ed70356dd 100644
--- a/res/res_agi.c
+++ b/res/res_agi.c
@@ -1481,11 +1481,9 @@ static enum agi_result launch_asyncagi(struct ast_channel *chan, int argc, char
to execute based on the setup info */
ast_uri_encode(agi_buffer, ami_buffer, AMI_BUF_SIZE, ast_uri_http);
startblob = ast_json_pack("{s: s}", "Env", ami_buffer);
- ast_channel_lock(chan);
ast_channel_publish_blob(chan, agi_async_start_type(), startblob);
hungup = ast_check_hangup(chan);
- ast_channel_unlock(chan);
for (;;) {
/*
* Process as many commands as we can. Commands are added via
@@ -1529,9 +1527,7 @@ static enum agi_result launch_asyncagi(struct ast_channel *chan, int argc, char
if (execblob && !ast_strlen_zero(cmd->cmd_id)) {
ast_json_object_set(execblob, "CommandId", ast_json_string_create(cmd->cmd_id));
}
- ast_channel_lock(chan);
ast_channel_publish_blob(chan, agi_async_exec_type(), execblob);
- ast_channel_unlock(chan);
free_agi_cmd(cmd);
@@ -1591,9 +1587,7 @@ async_agi_done:
ast_speech_destroy(async_agi.speech);
}
/* notify manager users this channel cannot be controlled anymore by Async AGI */
- ast_channel_lock(chan);
ast_channel_publish_blob(chan, agi_async_end_type(), NULL);
- ast_channel_unlock(chan);
async_agi_abort:
/* close the pipe */
@@ -2722,9 +2716,7 @@ static int handle_autohangup(struct ast_channel *chan, AGI *agi, int argc, const
whentohangup.tv_sec = timeout;
whentohangup.tv_usec = (timeout - whentohangup.tv_sec) * 1000000.0;
}
- ast_channel_lock(chan);
ast_channel_setwhentohangup_tv(chan, whentohangup);
- ast_channel_unlock(chan);
ast_agi_send(agi->fd, chan, "200 result=0\n");
return RESULT_SUCCESS;
}
@@ -3665,9 +3657,7 @@ static void publish_async_exec_end(struct ast_channel *chan, int command_id, con
"Command", command,
"ResultCode", result_code,
"Result", result);
- ast_channel_lock(chan);
ast_channel_publish_blob(chan, agi_exec_end_type(), blob);
- ast_channel_unlock(chan);
}
static enum agi_result agi_handle_command(struct ast_channel *chan, AGI *agi, char *buf, int dead)
@@ -3685,9 +3675,7 @@ static enum agi_result agi_handle_command(struct ast_channel *chan, AGI *agi, ch
startblob = ast_json_pack("{s: i, s: s}",
"CommandId", command_id,
"Command", ami_cmd);
- ast_channel_lock(chan);
ast_channel_publish_blob(chan, agi_exec_start_type(), startblob);
- ast_channel_unlock(chan);
parse_args(buf, &argc, argv);
c = find_command(argv, 0);