mirror of
				https://github.com/asterisk/asterisk.git
				synced 2025-10-31 02:37:10 +00:00 
			
		
		
		
	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: https://origsvn.digium.com/svn/asterisk/trunk@47821 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
		
							
								
								
									
										14
									
								
								main/app.c
									
									
									
									
									
								
							
							
						
						
									
										14
									
								
								main/app.c
									
									
									
									
									
								
							| @@ -541,7 +541,7 @@ static int __ast_play_and_record(struct ast_channel *chan, const char *playfile, | ||||
| 		if (!beep) | ||||
| 			d = ast_play_and_wait(chan, playfile); | ||||
| 		if (d > -1) | ||||
| 			d = ast_stream_and_wait(chan, "beep", chan->language, ""); | ||||
| 			d = ast_stream_and_wait(chan, "beep", ""); | ||||
| 		if (d < 0) | ||||
| 			return -1; | ||||
| 	} | ||||
| @@ -757,7 +757,7 @@ static int __ast_play_and_record(struct ast_channel *chan, const char *playfile, | ||||
| 		ast_log(LOG_WARNING, "Unable to restore format %s to channel '%s'\n", ast_getformatname(rfmt), chan->name); | ||||
| 	} | ||||
| 	if (outmsg == 2) { | ||||
| 		ast_stream_and_wait(chan, "auth-thankyou", chan->language, ""); | ||||
| 		ast_stream_and_wait(chan, "auth-thankyou", ""); | ||||
| 	} | ||||
| 	if (sildet) | ||||
| 		ast_dsp_free(sildet); | ||||
| @@ -1015,14 +1015,14 @@ int ast_record_review(struct ast_channel *chan, const char *playfile, const char | ||||
| 				cmd = '3'; | ||||
| 				break; | ||||
| 			} else { | ||||
| 				ast_stream_and_wait(chan, "vm-msgsaved", chan->language, ""); | ||||
| 				ast_stream_and_wait(chan, "vm-msgsaved", ""); | ||||
| 				cmd = 't'; | ||||
| 				return res; | ||||
| 			} | ||||
| 		case '2': | ||||
| 			/* Review */ | ||||
| 			ast_verbose(VERBOSE_PREFIX_3 "Reviewing the recording\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; | ||||
| @@ -1109,14 +1109,14 @@ static int ivr_dispatch(struct ast_channel *chan, struct ast_ivr_option *option, | ||||
| 	case AST_ACTION_NOOP: | ||||
| 		return 0; | ||||
| 	case AST_ACTION_BACKGROUND: | ||||
| 		res = ast_stream_and_wait(chan, (char *)option->adata, chan->language, AST_DIGIT_ANY); | ||||
| 		res = ast_stream_and_wait(chan, (char *)option->adata, AST_DIGIT_ANY); | ||||
| 		if (res < 0) { | ||||
| 			ast_log(LOG_NOTICE, "Unable to find file '%s'!\n", (char *)option->adata); | ||||
| 			res = 0; | ||||
| 		} | ||||
| 		return res; | ||||
| 	case AST_ACTION_PLAYBACK: | ||||
| 		res = ast_stream_and_wait(chan, (char *)option->adata, chan->language, ""); | ||||
| 		res = ast_stream_and_wait(chan, (char *)option->adata, ""); | ||||
| 		if (res < 0) { | ||||
| 			ast_log(LOG_NOTICE, "Unable to find file '%s'!\n", (char *)option->adata); | ||||
| 			res = 0; | ||||
| @@ -1145,7 +1145,7 @@ static int ivr_dispatch(struct ast_channel *chan, struct ast_ivr_option *option, | ||||
| 		res = 0; | ||||
| 		c = ast_strdupa(option->adata); | ||||
| 		while ((n = strsep(&c, ";"))) { | ||||
| 			if ((res = ast_stream_and_wait(chan, n, chan->language, | ||||
| 			if ((res = ast_stream_and_wait(chan, n, | ||||
| 					(option->action == AST_ACTION_BACKLIST) ? AST_DIGIT_ANY : ""))) | ||||
| 				break; | ||||
| 		} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user