[asterisk-commits] mmichelson: branch 1.4 r75405 - /branches/1.4/apps/app_dial.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Jul 17 15:03:48 CDT 2007


Author: mmichelson
Date: Tue Jul 17 15:03:48 2007
New Revision: 75405

URL: http://svn.digium.com/view/asterisk?view=rev&rev=75405
Log:
Fixing an error I made earlier. ast_fileexists can return -1 on failure, so I need to be sure that we only enter the if
statement if it is successful.

Related to my fix to issue #10186


Modified:
    branches/1.4/apps/app_dial.c

Modified: branches/1.4/apps/app_dial.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/apps/app_dial.c?view=diff&rev=75405&r1=75404&r2=75405
==============================================================================
--- branches/1.4/apps/app_dial.c (original)
+++ branches/1.4/apps/app_dial.c Tue Jul 17 15:03:48 2007
@@ -1771,7 +1771,7 @@
 		if (res == 0) {
 			if (ast_test_flag(&peerflags, OPT_DTMF_EXIT)) {
 				if (!ast_strlen_zero(announce)) {
-					if (ast_fileexists(announce, NULL, chan->language)) {
+					if (ast_fileexists(announce, NULL, chan->language) > 0) {
 						if(!(res = ast_streamfile(chan, announce, chan->language)))								
 							ast_waitstream(chan, AST_DIGIT_ANY);
 					} else
@@ -1784,7 +1784,7 @@
 				}
 			} else {
 				if (!ast_strlen_zero(announce)) {
-					if (ast_fileexists(announce, NULL, chan->language)) {
+					if (ast_fileexists(announce, NULL, chan->language) > 0) {
 						if (!(res = ast_streamfile(chan, announce, chan->language)))
 							res = ast_waitstream(chan, "");
 					} else




More information about the asterisk-commits mailing list