aboutsummaryrefslogtreecommitdiffstats
path: root/res/res_features.c
diff options
context:
space:
mode:
authormurf <murf@f38db490-d61c-443f-a65b-d21fe96a405b>2006-11-17 23:18:51 +0000
committermurf <murf@f38db490-d61c-443f-a65b-d21fe96a405b>2006-11-17 23:18:51 +0000
commit9ed9bbabf4b8ff0294c44090db38596e4372f7ab (patch)
treea3f2ce4fd65d5aa1475c1c2759546c3e95ee294f /res/res_features.c
parent9c024540238f1c193d392978b6d7517a75c54e6a (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 'res/res_features.c')
-rw-r--r--res/res_features.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/res/res_features.c b/res/res_features.c
index 5494d5a09..b1d50e59b 100644
--- a/res/res_features.c
+++ b/res/res_features.c
@@ -547,7 +547,7 @@ static int builtin_automonitor(struct ast_channel *chan, struct ast_channel *pee
if (!ast_strlen_zero(courtesytone)) {
if (ast_autoservice_start(callee_chan))
return -1;
- if (ast_stream_and_wait(caller_chan, courtesytone, caller_chan->language, "")) {
+ if (ast_stream_and_wait(caller_chan, courtesytone, "")) {
ast_log(LOG_WARNING, "Failed to play courtesy tone!\n");
ast_autoservice_stop(callee_chan);
return -1;
@@ -652,7 +652,7 @@ static int builtin_blindtransfer(struct ast_channel *chan, struct ast_channel *p
memset(xferto, 0, sizeof(xferto));
/* Transfer */
- res = ast_stream_and_wait(transferer, "pbx-transfer", transferer->language, AST_DIGIT_ANY);
+ res = ast_stream_and_wait(transferer, "pbx-transfer", AST_DIGIT_ANY);
if (res < 0) {
finishup(transferee);
return -1; /* error ? */
@@ -702,7 +702,7 @@ static int builtin_blindtransfer(struct ast_channel *chan, struct ast_channel *p
if (option_verbose > 2)
ast_verbose(VERBOSE_PREFIX_3 "Unable to find extension '%s' in context '%s'\n", xferto, transferer_real_context);
}
- if (ast_stream_and_wait(transferer, xferfailsound, transferer->language, AST_DIGIT_ANY) < 0 ) {
+ if (ast_stream_and_wait(transferer, xferfailsound, AST_DIGIT_ANY) < 0 ) {
finishup(transferee);
return -1;
}
@@ -751,7 +751,7 @@ static int builtin_atxfer(struct ast_channel *chan, struct ast_channel *peer, st
ast_indicate(transferee, AST_CONTROL_HOLD);
/* Transfer */
- res = ast_stream_and_wait(transferer, "pbx-transfer", transferer->language, AST_DIGIT_ANY);
+ res = ast_stream_and_wait(transferer, "pbx-transfer", AST_DIGIT_ANY);
if (res < 0) {
finishup(transferee);
return res;
@@ -768,7 +768,7 @@ static int builtin_atxfer(struct ast_channel *chan, struct ast_channel *peer, st
if (res == 0) {
ast_log(LOG_WARNING, "Did not read data.\n");
finishup(transferee);
- if (ast_stream_and_wait(transferer, "beeperr", transferer->language, ""))
+ if (ast_stream_and_wait(transferer, "beeperr", ""))
return -1;
return FEATURE_RETURN_SUCCESS;
}
@@ -777,7 +777,7 @@ static int builtin_atxfer(struct ast_channel *chan, struct ast_channel *peer, st
if (!ast_exists_extension(transferer, transferer_real_context, xferto, 1, transferer->cid.cid_num)) {
ast_log(LOG_WARNING, "Extension %s does not exist in context %s\n",xferto,transferer_real_context);
finishup(transferee);
- if (ast_stream_and_wait(transferer, "beeperr", transferer->language, ""))
+ if (ast_stream_and_wait(transferer, "beeperr", ""))
return -1;
return FEATURE_RETURN_SUCCESS;
}
@@ -791,7 +791,7 @@ static int builtin_atxfer(struct ast_channel *chan, struct ast_channel *peer, st
finishup(transferee);
/* any reason besides user requested cancel and busy triggers the failed sound */
if (outstate != AST_CONTROL_UNHOLD && outstate != AST_CONTROL_BUSY &&
- ast_stream_and_wait(transferer, xferfailsound, transferer->language, ""))
+ ast_stream_and_wait(transferer, xferfailsound, ""))
return -1;
return FEATURE_RETURN_SUCCESS;
}
@@ -804,7 +804,7 @@ static int builtin_atxfer(struct ast_channel *chan, struct ast_channel *peer, st
res = ast_bridge_call(transferer, newchan, &bconfig);
if (newchan->_softhangup || newchan->_state != AST_STATE_UP || !transferer->_softhangup) {
ast_hangup(newchan);
- if (ast_stream_and_wait(transferer, xfersound, transferer->language, ""))
+ if (ast_stream_and_wait(transferer, xfersound, ""))
ast_log(LOG_WARNING, "Failed to play transfer sound!\n");
finishup(transferee);
transferer->_softhangup = 0;
@@ -856,7 +856,7 @@ static int builtin_atxfer(struct ast_channel *chan, struct ast_channel *peer, st
tobj->peer = newchan;
tobj->bconfig = *config;
- if (ast_stream_and_wait(newchan, xfersound, newchan->language, ""))
+ if (ast_stream_and_wait(newchan, xfersound, ""))
ast_log(LOG_WARNING, "Failed to play transfer sound!\n");
ast_bridge_call_thread_launch(tobj);
return -1; /* XXX meaning the channel is bridged ? */
@@ -1794,9 +1794,9 @@ static int park_exec(struct ast_channel *chan, void *data)
int error = 0;
ast_indicate(peer, AST_CONTROL_UNHOLD);
if (parkedplay == 0) {
- error = ast_stream_and_wait(chan, courtesytone, chan->language, "");
+ error = ast_stream_and_wait(chan, courtesytone, "");
} else if (parkedplay == 1) {
- error = ast_stream_and_wait(peer, courtesytone, chan->language, "");
+ error = ast_stream_and_wait(peer, courtesytone, "");
} else if (parkedplay == 2) {
if (!ast_streamfile(chan, courtesytone, chan->language) &&
!ast_streamfile(peer, courtesytone, chan->language)) {
@@ -1842,7 +1842,7 @@ static int park_exec(struct ast_channel *chan, void *data)
return res;
} else {
/*! \todo XXX Play a message XXX */
- if (ast_stream_and_wait(chan, "pbx-invalidpark", chan->language, ""))
+ if (ast_stream_and_wait(chan, "pbx-invalidpark", ""))
ast_log(LOG_WARNING, "ast_streamfile of %s failed on %s\n", "pbx-invalidpark", chan->name);
if (option_verbose > 2)
ast_verbose(VERBOSE_PREFIX_3 "Channel %s tried to talk to nonexistent parked call %d\n", chan->name, park);