[asterisk-commits] qwell: branch 1.4 r77795 - /branches/1.4/main/say.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Jul 30 15:17:08 CDT 2007
Author: qwell
Date: Mon Jul 30 15:17:08 2007
New Revision: 77795
URL: http://svn.digium.com/view/asterisk?view=rev&rev=77795
Log:
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:
branches/1.4/main/say.c
Modified: branches/1.4/main/say.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/main/say.c?view=diff&rev=77795&r1=77794&r2=77795
==============================================================================
--- branches/1.4/main/say.c (original)
+++ branches/1.4/main/say.c Mon Jul 30 15:17:08 2007
@@ -124,14 +124,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++;
}
@@ -202,14 +204,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++;
}
@@ -250,7 +254,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