summaryrefslogtreecommitdiff
path: root/res
diff options
context:
space:
mode:
authorTerry Wilson <twilson@digium.com>2012-03-13 18:20:34 +0000
committerTerry Wilson <twilson@digium.com>2012-03-13 18:20:34 +0000
commit786f5898d12d30c481b1d178bb80e5801dbf666f (patch)
tree2b5e07ed1b5fbd7aae1187f068eff498621878a2 /res
parent73ec67e008ca6db76625bfc1f992fa726c948837 (diff)
Finalize ast_channel opaquification
Review: https://reviewboard.asterisk.org/r/1786/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@358907 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res')
-rw-r--r--res/res_agi.c10
-rw-r--r--res/res_musiconhold.c4
-rw-r--r--res/snmp/agent.c4
3 files changed, 9 insertions, 9 deletions
diff --git a/res/res_agi.c b/res/res_agi.c
index acac4c89a..1a5ff7fbf 100644
--- a/res/res_agi.c
+++ b/res/res_agi.c
@@ -2496,8 +2496,8 @@ static int handle_exec(struct ast_channel *chan, AGI *agi, int argc, const char
ast_verb(3, "AGI Script Executing Application: (%s) Options: (%s)\n", argv[1], argc >= 3 ? argv[2] : "");
if ((app_to_exec = pbx_findapp(argv[1]))) {
- if (!(workaround = ast_test_flag(chan, AST_FLAG_DISABLE_WORKAROUNDS))) {
- ast_set_flag(chan, AST_FLAG_DISABLE_WORKAROUNDS);
+ if (!(workaround = ast_test_flag(ast_channel_flags(chan), AST_FLAG_DISABLE_WORKAROUNDS))) {
+ ast_set_flag(ast_channel_flags(chan), AST_FLAG_DISABLE_WORKAROUNDS);
}
if (ast_compat_res_agi && argc >= 3 && !ast_strlen_zero(argv[2])) {
char *compat = alloca(strlen(argv[2]) * 2 + 1), *cptr;
@@ -2518,7 +2518,7 @@ static int handle_exec(struct ast_channel *chan, AGI *agi, int argc, const char
res = pbx_exec(chan, app_to_exec, argc == 2 ? "" : argv[2]);
}
if (!workaround) {
- ast_clear_flag(chan, AST_FLAG_DISABLE_WORKAROUNDS);
+ ast_clear_flag(ast_channel_flags(chan), AST_FLAG_DISABLE_WORKAROUNDS);
}
} else {
ast_log(LOG_WARNING, "Could not find application (%s)\n", argv[1]);
@@ -3008,7 +3008,7 @@ static int handle_speechrecognize(struct ast_channel *chan, AGI *agi, int argc,
switch (speech->state) {
case AST_SPEECH_STATE_READY:
/* If the stream is done, start timeout calculation */
- if ((timeout > 0) && start == 0 && ((!ast_channel_stream(chan)) || (ast_channel_streamid(chan) == -1 && chan->timingfunc == NULL))) {
+ if ((timeout > 0) && start == 0 && ((!ast_channel_stream(chan)) || (ast_channel_streamid(chan) == -1 && ast_channel_timingfunc(chan) == NULL))) {
ast_stopstream(chan);
time(&start);
}
@@ -3018,7 +3018,7 @@ static int handle_speechrecognize(struct ast_channel *chan, AGI *agi, int argc,
break;
case AST_SPEECH_STATE_WAIT:
/* Cue waiting sound if not already playing */
- if ((!ast_channel_stream(chan)) || (ast_channel_streamid(chan) == -1 && chan->timingfunc == NULL)) {
+ if ((!ast_channel_stream(chan)) || (ast_channel_streamid(chan) == -1 && ast_channel_timingfunc(chan) == NULL)) {
ast_stopstream(chan);
/* If a processing sound exists, or is not none - play it */
if (!ast_strlen_zero(speech->processing_sound) && strcasecmp(speech->processing_sound, "none"))
diff --git a/res/res_musiconhold.c b/res/res_musiconhold.c
index 37d347809..639c3b05f 100644
--- a/res/res_musiconhold.c
+++ b/res/res_musiconhold.c
@@ -1562,7 +1562,7 @@ static int local_ast_moh_start(struct ast_channel *chan, const char *mclass, con
ast_channel_name(chan), ast_channel_uniqueid(chan),
mohclass->name);
- ast_set_flag(chan, AST_FLAG_MOH);
+ ast_set_flag(ast_channel_flags(chan), AST_FLAG_MOH);
if (mohclass->total_files) {
res = ast_activate_generator(chan, &moh_file_stream, mohclass);
@@ -1577,7 +1577,7 @@ static int local_ast_moh_start(struct ast_channel *chan, const char *mclass, con
static void local_ast_moh_stop(struct ast_channel *chan)
{
- ast_clear_flag(chan, AST_FLAG_MOH);
+ ast_clear_flag(ast_channel_flags(chan), AST_FLAG_MOH);
ast_deactivate_generator(chan);
ast_channel_lock(chan);
diff --git a/res/snmp/agent.c b/res/snmp/agent.c
index 9989ae17e..3cc630471 100644
--- a/res/snmp/agent.c
+++ b/res/snmp/agent.c
@@ -503,10 +503,10 @@ static u_char *ast_var_channels_table(struct variable *vp, oid *name, size_t *le
case ASTCHANFLAGS:
bits_ret[0] = 0;
for (bit = 0; bit < 8; bit++)
- bits_ret[0] |= ((chan->flags & (1 << bit)) >> bit) << (7 - bit);
+ bits_ret[0] |= ((ast_channel_flags(chan)->flags & (1 << bit)) >> bit) << (7 - bit);
bits_ret[1] = 0;
for (bit = 0; bit < 8; bit++)
- bits_ret[1] |= (((chan->flags >> 8) & (1 << bit)) >> bit) << (7 - bit);
+ bits_ret[1] |= (((ast_channel_flags(chan)->flags >> 8) & (1 << bit)) >> bit) << (7 - bit);
*var_len = 2;
ret = bits_ret;
break;