]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Fixing an error I made earlier. ast_fileexists can return -1 on failure, so I need...
authorMark Michelson <mmichelson@digium.com>
Tue, 17 Jul 2007 20:03:48 +0000 (20:03 +0000)
committerMark Michelson <mmichelson@digium.com>
Tue, 17 Jul 2007 20:03:48 +0000 (20:03 +0000)
statement if it is successful.

Related to my fix to issue #10186

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@75405 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_dial.c

index 79bcbc97ff87b0a901eb17732be6f548f33d7294..590f1a2a1621fe4a3a7f9e3dfa75ff891f05618e 100644 (file)
@@ -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