summaryrefslogtreecommitdiff
path: root/apps/app_agi.c
diff options
context:
space:
mode:
authorMark Spencer <markster@digium.com>2004-03-27 06:50:12 +0000
committerMark Spencer <markster@digium.com>2004-03-27 06:50:12 +0000
commiteeb2ca5b26dfb3d47fa9676f1ef35fff64d3aaeb (patch)
tree8787e6295801bf6156269a895cc43bd31aaab412 /apps/app_agi.c
parent4b4c55e32874a1d6f0868bf80f5462636711078f (diff)
Make read/write mode have a lock parameter and use it properly.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2572 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps/app_agi.c')
-rwxr-xr-xapps/app_agi.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/apps/app_agi.c b/apps/app_agi.c
index 529fbe2e1..e2cdd0ebc 100755
--- a/apps/app_agi.c
+++ b/apps/app_agi.c
@@ -521,7 +521,7 @@ static int handle_recordfile(struct ast_channel *chan, AGI *agi, int argc, char
if (silence > 0) {
rfmt = chan->readformat;
- res = ast_set_read_format(chan, AST_FORMAT_SLINEAR);
+ res = ast_set_read_format(chan, AST_FORMAT_SLINEAR, 1);
if (res < 0) {
ast_log(LOG_WARNING, "Unable to set to linear mode, giving up\n");
return -1;
@@ -633,7 +633,7 @@ static int handle_recordfile(struct ast_channel *chan, AGI *agi, int argc, char
fdprintf(agi->fd, "200 result=%d (randomerror) endpos=%ld\n", res, sample_offset);
if (silence > 0) {
- res = ast_set_read_format(chan, rfmt);
+ res = ast_set_read_format(chan, rfmt, 1);
if (res)
ast_log(LOG_WARNING, "Unable to restore read format on '%s'\n", chan->name);
ast_dsp_free(sildet);
@@ -1484,13 +1484,13 @@ static int eagi_exec(struct ast_channel *chan, void *data)
int readformat;
int res;
readformat = chan->readformat;
- if (ast_set_read_format(chan, AST_FORMAT_SLINEAR)) {
+ if (ast_set_read_format(chan, AST_FORMAT_SLINEAR, 1)) {
ast_log(LOG_WARNING, "Unable to set channel '%s' to linear mode\n", chan->name);
return -1;
}
res = agi_exec_full(chan, data, 1, 0);
if (!res) {
- if (ast_set_read_format(chan, readformat)) {
+ if (ast_set_read_format(chan, readformat, 1)) {
ast_log(LOG_WARNING, "Unable to restore channel '%s' to format %s\n", chan->name, ast_getformatname(readformat));
}
}