diff options
author | murf <murf@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-11-17 23:18:51 +0000 |
---|---|---|
committer | murf <murf@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-11-17 23:18:51 +0000 |
commit | 9ed9bbabf4b8ff0294c44090db38596e4372f7ab (patch) | |
tree | a3f2ce4fd65d5aa1475c1c2759546c3e95ee294f /apps | |
parent | 9c024540238f1c193d392978b6d7517a75c54e6a (diff) |
This update fulfils the request of bug 7109, which claimed the language arg to ast_stream_and_wait() was redundant. Almost all calls just used chan->language, and seeing how chan is the first argument, this certainly seems redundant. A change of language could just as easily be done by simply changing the channel language before calling.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@47821 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rw-r--r-- | apps/app_directory.c | 10 | ||||
-rw-r--r-- | apps/app_followme.c | 4 | ||||
-rw-r--r-- | apps/app_voicemail.c | 18 |
3 files changed, 16 insertions, 16 deletions
diff --git a/apps/app_directory.c b/apps/app_directory.c index 14d5dd61a..3b1d29e11 100644 --- a/apps/app_directory.c +++ b/apps/app_directory.c @@ -282,17 +282,17 @@ static int play_mailbox_owner(struct ast_channel *chan, char *context, #endif if (ast_fileexists(fn, NULL, chan->language) > 0) { - res = ast_stream_and_wait(chan, fn, chan->language, AST_DIGIT_ANY); + res = ast_stream_and_wait(chan, fn, AST_DIGIT_ANY); ast_stopstream(chan); /* If Option 'e' was specified, also read the extension number with the name */ if (readext) { - ast_stream_and_wait(chan, "vm-extension", chan->language, AST_DIGIT_ANY); + ast_stream_and_wait(chan, "vm-extension", AST_DIGIT_ANY); res = ast_say_character_str(chan, ext, AST_DIGIT_ANY, chan->language); } } else { res = ast_say_character_str(chan, S_OR(name, ext), AST_DIGIT_ANY, chan->language); if (!ast_strlen_zero(name) && readext) { - ast_stream_and_wait(chan, "vm-extension", chan->language, AST_DIGIT_ANY); + ast_stream_and_wait(chan, "vm-extension", AST_DIGIT_ANY); res = ast_say_character_str(chan, ext, AST_DIGIT_ANY, chan->language); } } @@ -303,7 +303,7 @@ static int play_mailbox_owner(struct ast_channel *chan, char *context, for (loop = 3 ; loop > 0; loop--) { if (!res) - res = ast_stream_and_wait(chan, "dir-instr", chan->language, AST_DIGIT_ANY); + res = ast_stream_and_wait(chan, "dir-instr", AST_DIGIT_ANY); if (!res) res = ast_waitfordigit(chan, 3000); ast_stopstream(chan); @@ -622,7 +622,7 @@ static int directory_exec(struct ast_channel *chan, void *data) for (;;) { if (!res) - res = ast_stream_and_wait(chan, dirintro, chan->language, AST_DIGIT_ANY); + res = ast_stream_and_wait(chan, dirintro, AST_DIGIT_ANY); ast_stopstream(chan); if (!res) res = ast_waitfordigit(chan, 5000); diff --git a/apps/app_followme.c b/apps/app_followme.c index f83cfa165..27667b22f 100644 --- a/apps/app_followme.c +++ b/apps/app_followme.c @@ -982,7 +982,7 @@ static int app_exec(struct ast_channel *chan, void *data) ast_mutex_unlock(&f->lock); if (targs.followmeflags.flags & FOLLOWMEFLAG_STATUSMSG) - ast_stream_and_wait(chan, targs.statusprompt, chan->language, ""); + ast_stream_and_wait(chan, targs.statusprompt, ""); snprintf(namerecloc,sizeof(namerecloc),"%s/followme.%s",ast_config_AST_SPOOL_DIR,chan->uniqueid); duration = 5; @@ -1022,7 +1022,7 @@ static int app_exec(struct ast_channel *chan, void *data) if (targs.status != 100) { ast_moh_stop(chan); if (targs.followmeflags.flags & FOLLOWMEFLAG_UNREACHABLEMSG) - ast_stream_and_wait(chan, targs.sorryprompt, chan->language, ""); + ast_stream_and_wait(chan, targs.sorryprompt, ""); res = 0; } else { caller = chan; diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c index 14531240f..dbf306ec3 100644 --- a/apps/app_voicemail.c +++ b/apps/app_voicemail.c @@ -2147,7 +2147,7 @@ static int invent_message(struct ast_channel *chan, char *context, char *ext, in snprintf(fn, sizeof(fn), "%s%s/%s/greet", VM_SPOOL_DIR, context, ext); RETRIEVE(fn, -1); if (ast_fileexists(fn, NULL, NULL) > 0) { - res = ast_stream_and_wait(chan, fn, chan->language, ecodes); + res = ast_stream_and_wait(chan, fn, ecodes); if (res) { DISPOSE(fn, -1); return res; @@ -2155,14 +2155,14 @@ static int invent_message(struct ast_channel *chan, char *context, char *ext, in } else { /* Dispose just in case */ DISPOSE(fn, -1); - res = ast_stream_and_wait(chan, "vm-theperson", chan->language, ecodes); + res = ast_stream_and_wait(chan, "vm-theperson", ecodes); if (res) return res; res = ast_say_digit_str(chan, ext, ecodes, chan->language); if (res) return res; } - res = ast_stream_and_wait(chan, busy ? "vm-isonphone" : "vm-isunavail", chan->language, ecodes); + res = ast_stream_and_wait(chan, busy ? "vm-isonphone" : "vm-isunavail", ecodes); return res; } @@ -2929,7 +2929,7 @@ static int leave_voicemail(struct ast_channel *chan, char *ext, struct leave_vm_ res = 0; } if (!res && !ast_test_flag(options, OPT_SILENT)) { - res = ast_stream_and_wait(chan, INTRO, chan->language, ecodes); + res = ast_stream_and_wait(chan, INTRO, ecodes); if (res == '#') { ast_set_flag(options, OPT_SILENT); res = 0; @@ -3043,7 +3043,7 @@ static int leave_voicemail(struct ast_channel *chan, char *ext, struct leave_vm_ /* Now play the beep once we have the message number for our next message. */ if (res >= 0) { /* Unless we're *really* silent, try to send the beep */ - res = ast_stream_and_wait(chan, "beep", chan->language, ""); + res = ast_stream_and_wait(chan, "beep", ""); } /* Store information */ @@ -4156,7 +4156,7 @@ static int forward_message(struct ast_channel *chan, char *context, struct vm_st static int wait_file2(struct ast_channel *chan, struct vm_state *vms, char *file) { int res; - if ((res = ast_stream_and_wait(chan, file, chan->language, AST_DIGIT_ANY)) < 0) + if ((res = ast_stream_and_wait(chan, file, AST_DIGIT_ANY)) < 0) ast_log(LOG_WARNING, "Unable to play message %s\n", file); return res; } @@ -4287,7 +4287,7 @@ static int play_message_callerid(struct ast_channel *chan, struct vm_state *vms, ast_verbose(VERBOSE_PREFIX_3 "Playing envelope info: CID number '%s' matches mailbox number, playing recorded name\n", callerid); if (!callback) res = wait_file2(chan, vms, "vm-from"); - res = ast_stream_and_wait(chan, prefile, chan->language, ""); + res = ast_stream_and_wait(chan, prefile, ""); } else { if (option_verbose > 2) ast_verbose(VERBOSE_PREFIX_3 "Playing envelope info: message from '%s'\n", callerid); @@ -8005,7 +8005,7 @@ static int play_record_review(struct ast_channel *chan, char *playfile, char *re /* Otherwise 1 is to save the existing message */ if (option_verbose > 2) ast_verbose(VERBOSE_PREFIX_3 "Saving message as is\n"); - ast_stream_and_wait(chan, "vm-msgsaved", chan->language, ""); + ast_stream_and_wait(chan, "vm-msgsaved", ""); cmd = 't'; return res; } @@ -8013,7 +8013,7 @@ static int play_record_review(struct ast_channel *chan, char *playfile, char *re /* Review */ if (option_verbose > 2) ast_verbose(VERBOSE_PREFIX_3 "Reviewing the message\n"); - cmd = ast_stream_and_wait(chan, recordfile, chan->language, AST_DIGIT_ANY); + cmd = ast_stream_and_wait(chan, recordfile, AST_DIGIT_ANY); break; case '3': message_exists = 0; |