summaryrefslogtreecommitdiff
path: root/apps/app_while.c
diff options
context:
space:
mode:
authorTerry Wilson <twilson@digium.com>2012-02-20 23:43:27 +0000
committerTerry Wilson <twilson@digium.com>2012-02-20 23:43:27 +0000
commit57f42bd74f78d5022631b2ba2269892f8a3a384a (patch)
tree3283ec4ac88c5b3c267f4490b410e5331911f2bb /apps/app_while.c
parent25e5eb3b96e6d9bcbb2fc02fbd879ae21104c1f5 (diff)
ast_channel opaquification of pointers and integral types
Review: https://reviewboard.asterisk.org/r/1753/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@356042 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps/app_while.c')
-rw-r--r--apps/app_while.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/apps/app_while.c b/apps/app_while.c
index 25d7c433b..5e8fb9bb4 100644
--- a/apps/app_while.c
+++ b/apps/app_while.c
@@ -165,7 +165,7 @@ static int find_matching_endwhile(struct ast_channel *chan)
if (!ast_rdlock_context(c)) {
if (!strcmp(ast_get_context_name(c), ast_channel_context(chan))) {
/* This is the matching context we want */
- int cur_priority = chan->priority + 1, level=1;
+ int cur_priority = ast_channel_priority(chan) + 1, level=1;
for (e = find_matching_priority(c, ast_channel_exten(chan), cur_priority,
S_COR(chan->caller.id.number.valid, chan->caller.id.number.str, NULL));
@@ -238,7 +238,7 @@ static int _while_exec(struct ast_channel *chan, const char *data, int end)
size = strlen(ast_channel_context(chan)) + strlen(ast_channel_exten(chan)) + 32;
my_name = alloca(size);
memset(my_name, 0, size);
- snprintf(my_name, size, "%s_%s_%d", ast_channel_context(chan), ast_channel_exten(chan), chan->priority);
+ snprintf(my_name, size, "%s_%s_%d", ast_channel_context(chan), ast_channel_exten(chan), ast_channel_priority(chan));
ast_channel_lock(chan);
if (end) {
@@ -269,9 +269,9 @@ static int _while_exec(struct ast_channel *chan, const char *data, int end)
int pri = find_matching_endwhile(chan);
if (pri > 0) {
ast_verb(3, "Jumping to priority %d\n", pri);
- chan->priority = pri;
+ ast_channel_priority_set(chan, pri);
} else {
- ast_log(LOG_WARNING, "Couldn't find matching EndWhile? (While at %s@%s priority %d)\n", ast_channel_context(chan), ast_channel_exten(chan), chan->priority);
+ ast_log(LOG_WARNING, "Couldn't find matching EndWhile? (While at %s@%s priority %d)\n", ast_channel_context(chan), ast_channel_exten(chan), ast_channel_priority(chan));
}
}
ast_channel_unlock(chan);
@@ -283,7 +283,7 @@ static int _while_exec(struct ast_channel *chan, const char *data, int end)
size = strlen(ast_channel_context(chan)) + strlen(ast_channel_exten(chan)) + 32;
goto_str = alloca(size);
memset(goto_str, 0, size);
- snprintf(goto_str, size, "%s,%s,%d", ast_channel_context(chan), ast_channel_exten(chan), chan->priority);
+ snprintf(goto_str, size, "%s,%s,%d", ast_channel_context(chan), ast_channel_exten(chan), ast_channel_priority(chan));
pbx_builtin_setvar_helper(chan, varname, goto_str);
}
@@ -295,7 +295,7 @@ static int _while_exec(struct ast_channel *chan, const char *data, int end)
size = strlen(ast_channel_context(chan)) + strlen(ast_channel_exten(chan)) + 32;
goto_str = alloca(size);
memset(goto_str, 0, size);
- snprintf(goto_str, size, "%s,%s,%d", ast_channel_context(chan), ast_channel_exten(chan), chan->priority+1);
+ snprintf(goto_str, size, "%s,%s,%d", ast_channel_context(chan), ast_channel_exten(chan), ast_channel_priority(chan)+1);
pbx_builtin_setvar_helper(chan, end_varname, goto_str);
}
ast_parseable_goto(chan, while_pri);