[asterisk-commits] qwell: trunk r77796 - in /trunk: ./ main/say.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Jul 30 15:19:13 CDT 2007


Author: qwell
Date: Mon Jul 30 15:19:13 2007
New Revision: 77796

URL: http://svn.digium.com/view/asterisk?view=rev&rev=77796
Log:
Merged revisions 77795 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

(closes issue #10083)
........
r77795 | qwell | 2007-07-30 15:17:08 -0500 (Mon, 30 Jul 2007) | 6 lines

Applications like SayAlpha() should not hang up the channel if you
 request an "unknown" character such as a comma.
Instead, skip the character and move on.

Issue 10083, initial patch by jsmith, modified by me.

........

Modified:
    trunk/   (props changed)
    trunk/main/say.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Modified: trunk/main/say.c
URL: http://svn.digium.com/view/asterisk/trunk/main/say.c?view=diff&rev=77796&r1=77795&r2=77796
==============================================================================
--- trunk/main/say.c (original)
+++ trunk/main/say.c Mon Jul 30 15:19:13 2007
@@ -126,14 +126,16 @@
 			fnbuf[8] = ltr;
 			fn = fnbuf;
 		}
-		res = ast_streamfile(chan, fn, lang);
-		if (!res) {
-			if ((audiofd  > -1) && (ctrlfd > -1))
-				res = ast_waitstream_full(chan, ints, audiofd, ctrlfd);
-			else
-				res = ast_waitstream(chan, ints);
-		}
-		ast_stopstream(chan);
+		if (fn && ast_fileexists(fn, NULL, NULL) > 0) {
+			res = ast_streamfile(chan, fn, lang);
+			if (!res) {
+				if ((audiofd  > -1) && (ctrlfd > -1))
+					res = ast_waitstream_full(chan, ints, audiofd, ctrlfd);
+				else
+					res = ast_waitstream(chan, ints);
+			}
+			ast_stopstream(chan);
+		}
 		num++;
 	}
 
@@ -204,14 +206,16 @@
 			fnbuf[9] = ltr;
 			fn = fnbuf;
 		}
-		res = ast_streamfile(chan, fn, lang);
-		if (!res) {
-			if ((audiofd  > -1) && (ctrlfd > -1))
-				res = ast_waitstream_full(chan, ints, audiofd, ctrlfd);
-			else
-				res = ast_waitstream(chan, ints);
-		}
-		ast_stopstream(chan);
+		if (fn && ast_fileexists(fn, NULL, NULL) > 0) {
+			res = ast_streamfile(chan, fn, lang);
+			if (!res) {
+				if ((audiofd  > -1) && (ctrlfd > -1))
+					res = ast_waitstream_full(chan, ints, audiofd, ctrlfd);
+				else
+					res = ast_waitstream(chan, ints);
+			}
+			ast_stopstream(chan);
+		}
 		num++;
 	}
 
@@ -252,7 +256,7 @@
 			fn = fnbuf;
 			break;
 		}
-		if (fn) {
+		if (fn && ast_fileexists(fn, NULL, NULL) > 0) {
 			res = ast_streamfile(chan, fn, lang);
 			if (!res) {
 				if ((audiofd  > -1) && (ctrlfd > -1))




More information about the asterisk-commits mailing list