ast_fileexists returns -1 for error and 0 for a non-existant file. The existing
code treated missing files as though they were existed.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@284881
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
ast_channel_unlock(peer);
if (!ast_test_flag(flags, OPTION_QUIET)) {
- 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, "");