summaryrefslogtreecommitdiff
path: root/apps/app_minivm.c
diff options
context:
space:
mode:
authorTerry Wilson <twilson@digium.com>2012-01-24 20:12:09 +0000
committerTerry Wilson <twilson@digium.com>2012-01-24 20:12:09 +0000
commit99cae5b7508f30a308afbbacf92ad306a30f68df (patch)
treebdca00ce837e60a5f9a16fed06d02f6e77235035 /apps/app_minivm.c
parent2144ba5df2813609024964c4c2d9060b30d5cd43 (diff)
Opaquify channel stringfields
Continue channel opaque-ification by wrapping all of the stringfields. Eventually, we will restrict what can actually set these variables, but the purpose for now is to hide the implementation and keep people from adding code that directly accesses the channel structure. Semantic changes will follow afterward. Review: https://reviewboard.asterisk.org/r/1661/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@352348 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps/app_minivm.c')
-rw-r--r--apps/app_minivm.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/apps/app_minivm.c b/apps/app_minivm.c
index 9348b3a84..da9f68954 100644
--- a/apps/app_minivm.c
+++ b/apps/app_minivm.c
@@ -1543,7 +1543,7 @@ static int invent_message(struct ast_channel *chan, char *domain, char *username
snprintf(fn, sizeof(fn), "%s%s/%s/greet", MVM_SPOOL_DIR, domain, username);
if (ast_fileexists(fn, NULL, NULL) > 0) {
- res = ast_streamfile(chan, fn, chan->language);
+ res = ast_streamfile(chan, fn, ast_channel_language(chan));
if (res)
return -1;
res = ast_waitstream(chan, ecodes);
@@ -1565,23 +1565,23 @@ static int invent_message(struct ast_channel *chan, char *domain, char *username
}
if (numericusername) {
- if (ast_streamfile(chan, "vm-theperson", chan->language))
+ if (ast_streamfile(chan, "vm-theperson", ast_channel_language(chan)))
return -1;
if ((res = ast_waitstream(chan, ecodes)))
return res;
- res = ast_say_digit_str(chan, username, ecodes, chan->language);
+ res = ast_say_digit_str(chan, username, ecodes, ast_channel_language(chan));
if (res)
return res;
} else {
- if (ast_streamfile(chan, "vm-theextensionis", chan->language))
+ if (ast_streamfile(chan, "vm-theextensionis", ast_channel_language(chan)))
return -1;
if ((res = ast_waitstream(chan, ecodes)))
return res;
}
}
- res = ast_streamfile(chan, busy ? "vm-isonphone" : "vm-isunavail", chan->language);
+ res = ast_streamfile(chan, busy ? "vm-isonphone" : "vm-isunavail", ast_channel_language(chan));
if (res)
return -1;
res = ast_waitstream(chan, ecodes);
@@ -1637,7 +1637,7 @@ static int play_record_review(struct ast_channel *chan, char *playfile, char *re
case '2':
/* Review */
ast_verb(3, "Reviewing the message\n");
- ast_streamfile(chan, recordfile, chan->language);
+ ast_streamfile(chan, recordfile, ast_channel_language(chan));
cmd = ast_waitstream(chan, AST_DIGIT_ANY);
break;
case '3':
@@ -1902,7 +1902,7 @@ static int leave_voicemail(struct ast_channel *chan, char *username, struct leav
txtdes = mkstemp(tmptxtfile);
if (txtdes < 0) {
ast_log(LOG_ERROR, "Unable to create message file %s: %s\n", tmptxtfile, strerror(errno));
- res = ast_streamfile(chan, "vm-mailboxfull", chan->language);
+ res = ast_streamfile(chan, "vm-mailboxfull", ast_channel_language(chan));
if (!res)
res = ast_waitstream(chan, "");
pbx_builtin_setvar_helper(chan, "MVM_RECORD_STATUS", "FAILED");
@@ -1911,7 +1911,7 @@ static int leave_voicemail(struct ast_channel *chan, char *username, struct leav
if (res >= 0) {
/* Unless we're *really* silent, try to send the beep */
- res = ast_streamfile(chan, "beep", chan->language);
+ res = ast_streamfile(chan, "beep", ast_channel_language(chan));
if (!res)
res = ast_waitstream(chan, "");
}
@@ -2339,7 +2339,7 @@ static int minivm_greet_exec(struct ast_channel *chan, const char *data)
res = 0; /* Reset */
/* Play the beginning intro if desired */
if (!ast_strlen_zero(prefile)) {
- if (ast_streamfile(chan, prefile, chan->language) > -1)
+ if (ast_streamfile(chan, prefile, ast_channel_language(chan)) > -1)
res = ast_waitstream(chan, ecodes);
} else {
ast_debug(2, "%s doesn't exist, doing what we can\n", prefile);
@@ -2358,7 +2358,7 @@ static int minivm_greet_exec(struct ast_channel *chan, const char *data)
res = 0;
}
if (!res && !ast_test_flag(&leave_options, OPT_SILENT)) {
- res = ast_streamfile(chan, SOUND_INTRO, chan->language);
+ res = ast_streamfile(chan, SOUND_INTRO, ast_channel_language(chan));
if (!res)
res = ast_waitstream(chan, ecodes);
if (res == '#') {