summaryrefslogtreecommitdiff
path: root/apps/app_dial.c
diff options
context:
space:
mode:
authorMark Michelson <mmichelson@digium.com>2007-07-17 20:05:19 +0000
committerMark Michelson <mmichelson@digium.com>2007-07-17 20:05:19 +0000
commitee6d59eef2c2e9b97d95c6869b6662413c22446a (patch)
tree5c94a791a8b28ae6e7f3ee05d912af5bbf951d79 /apps/app_dial.c
parent9ffd55b6f98281c04f4b3d2f1ff82cec66f90b3e (diff)
Merged revisions 75405 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r75405 | mmichelson | 2007-07-17 15:03:48 -0500 (Tue, 17 Jul 2007) | 6 lines 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 ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75406 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps/app_dial.c')
-rw-r--r--apps/app_dial.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/app_dial.c b/apps/app_dial.c
index ac97f5a32..fec3f99e9 100644
--- a/apps/app_dial.c
+++ b/apps/app_dial.c
@@ -1917,7 +1917,7 @@ static int retrydial_exec(struct ast_channel *chan, void *data)
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
@@ -1930,7 +1930,7 @@ static int retrydial_exec(struct ast_channel *chan, void *data)
}
} 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