diff options
author | Terry Wilson <twilson@digium.com> | 2012-02-24 00:32:20 +0000 |
---|---|---|
committer | Terry Wilson <twilson@digium.com> | 2012-02-24 00:32:20 +0000 |
commit | ebaf59a656ef94e19332c08e0d0562b8cbe59f65 (patch) | |
tree | 6e75fd13924808bddacc18e14d5e02975a322481 /res/res_agi.c | |
parent | 235f88d12270b328ad466889189400666b3e56c1 (diff) |
Opaquification for ast_format structs in struct ast_channel
Review: https://reviewboard.asterisk.org/r/1770/
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@356573 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res/res_agi.c')
-rw-r--r-- | res/res_agi.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/res/res_agi.c b/res/res_agi.c index b8c39f929..4ea10bf30 100644 --- a/res/res_agi.c +++ b/res/res_agi.c @@ -2289,7 +2289,7 @@ static int handle_recordfile(struct ast_channel *chan, AGI *agi, int argc, const } if (silence > 0) { - ast_format_copy(&rfmt, &chan->readformat); + ast_format_copy(&rfmt, ast_channel_readformat(chan)); res = ast_set_read_format_by_id(chan, AST_FORMAT_SLINEAR); if (res < 0) { ast_log(LOG_WARNING, "Unable to set to linear mode, giving up\n"); @@ -2937,7 +2937,7 @@ static int handle_speechrecognize(struct ast_channel *chan, AGI *agi, int argc, offset = atoi(argv[4]); /* We want frames coming in signed linear */ - ast_format_copy(&old_read_format, &chan->readformat); + ast_format_copy(&old_read_format, ast_channel_readformat(chan)); if (ast_set_read_format_by_id(chan, AST_FORMAT_SLINEAR)) { ast_agi_send(agi->fd, chan, "200 result=0\n"); return RESULT_SUCCESS; @@ -3934,7 +3934,7 @@ static int eagi_exec(struct ast_channel *chan, const char *data) ast_log(LOG_ERROR, "EAGI cannot be run on a dead/hungup channel, please use AGI.\n"); return 0; } - ast_format_copy(&readformat, &chan->readformat); + ast_format_copy(&readformat, ast_channel_readformat(chan)); if (ast_set_read_format_by_id(chan, AST_FORMAT_SLINEAR)) { ast_log(LOG_WARNING, "Unable to set channel '%s' to linear mode\n", ast_channel_name(chan)); return -1; |