[asterisk-commits] file: branch 1.2 r68397 - /branches/1.2/say.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Thu Jun 7 17:15:34 MST 2007


Author: file
Date: Thu Jun  7 19:15:33 2007
New Revision: 68397

URL: http://svn.digium.com/view/asterisk?view=rev&rev=68397
Log:
Don't call ast_waitstream_full when the control file descriptor and audio file descriptor are not set, simply call ast_waitstream! (issue #8530 reported by rickead2000)

Modified:
    branches/1.2/say.c

Modified: branches/1.2/say.c
URL: http://svn.digium.com/view/asterisk/branches/1.2/say.c?view=diff&rev=68397&r1=68396&r2=68397
==============================================================================
--- branches/1.2/say.c (original)
+++ branches/1.2/say.c Thu Jun  7 19:15:33 2007
@@ -120,8 +120,12 @@
 			fn = fnbuf;
 		}
 		res = ast_streamfile(chan, fn, lang);
-		if (!res) 
-			res = ast_waitstream_full(chan, ints, audiofd, ctrlfd);
+		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++;
 	}
@@ -199,8 +203,12 @@
 			fn = fnbuf;
 		}
 		res = ast_streamfile(chan, fn, lang);
-		if (!res) 
-			res = ast_waitstream_full(chan, ints, audiofd, ctrlfd);
+		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++;
 	}
@@ -249,8 +257,12 @@
 		}
 		if (fn) {
 			res = ast_streamfile(chan, fn, lang);
-			if (!res) 
-				res = ast_waitstream_full(chan, ints, audiofd, ctrlfd);
+			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++;



More information about the asterisk-commits mailing list