aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_dial.c
diff options
context:
space:
mode:
authormmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2007-07-17 20:03:48 +0000
committermmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2007-07-17 20:03:48 +0000
commitb040ebf93c454fdd42ad18a29eac52198178f9bf (patch)
tree6f1d3ac74bd8e16a793b6b194b24e9bcde329c26 /apps/app_dial.c
parentde20b2e4550b76ddfbf699af9699d92c2488195b (diff)
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: http://svn.digium.com/svn/asterisk/branches/1.4@75405 f38db490-d61c-443f-a65b-d21fe96a405b
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 79bcbc97f..590f1a2a1 100644
--- a/apps/app_dial.c
+++ b/apps/app_dial.c
@@ -1771,7 +1771,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
@@ -1784,7 +1784,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