diff --git a/apps/app_chanspy.c b/apps/app_chanspy.c index 96748e6671..f1b509c634 100644 --- a/apps/app_chanspy.c +++ b/apps/app_chanspy.c @@ -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, "");