]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Treat the file as invalid if we have no valid formats for it (issue #7643 reported...
authorJoshua Colp <jcolp@digium.com>
Thu, 3 Aug 2006 19:54:02 +0000 (19:54 +0000)
committerJoshua Colp <jcolp@digium.com>
Thu, 3 Aug 2006 19:54:02 +0000 (19:54 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@38825 65c4cc65-6c06-0410-ace0-fbb531ad65f3

res/res_musiconhold.c

index 01d8a57d6d05265cc4c756a547015e8680a068a0..426965a81eeee11efcc4439f3a6095485e8861e8 100644 (file)
@@ -219,7 +219,7 @@ static int ast_moh_files_next(struct ast_channel *chan)
                        state->pos %= state->class->total_files;
 
                        /* check to see if this file's format can be opened */
-                       if (ast_fileexists(state->class->filearray[state->pos], NULL, NULL) != -1)
+                       if (ast_fileexists(state->class->filearray[state->pos], NULL, NULL) > 0)
                                break;
 
                }