Merged revisions 284921 via svnmerge from
[asterisk/asterisk.git] / apps / app_chanspy.c
index 96748e6..f1b509c 100644 (file)
@@ -927,7 +927,7 @@ static int common_exec(struct ast_channel *chan, struct ast_flags *flags,
                                }
                                if (!ast_test_flag(flags, OPTION_NAME) || res < 0) {
                                        if (!ast_test_flag(flags, OPTION_NOTECH)) {
-                                               if (ast_fileexists(peer_name, NULL, NULL) != -1) {
+                                               if (ast_fileexists(peer_name, NULL, NULL) > 0) {
                                                        res = ast_streamfile(chan, peer_name, chan->language);
                                                        if (!res) {
                                                                res = ast_waitstream(chan, "");