From: Mark Michelson Date: Thu, 18 Oct 2007 17:38:26 +0000 (+0000) Subject: If a non-existent file is specified to be played either as a periodic announcement X-Git-Tag: 1.4.14~126 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c9935ba132c12defc87ae23e8ea1d362839738f5;p=thirdparty%2Fasterisk.git If a non-existent file is specified to be played either as a periodic announcement or as a hold/position announcement, the caller would be kicked out of the queue. No longer does this happen. git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@86328 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/apps/app_queue.c b/apps/app_queue.c index 7a5ba8f36b..95a98df68a 100644 --- a/apps/app_queue.c +++ b/apps/app_queue.c @@ -1546,7 +1546,7 @@ posout: res = play_file(qe->chan, qe->parent->sound_thanks); playout: - if (res > 0 && !valid_exit(qe, res)) + if ((res > 0 && !valid_exit(qe, res)) || res < 0) res = 0; /* Set our last_pos indicators */ @@ -1979,7 +1979,7 @@ static int say_periodic_announcement(struct queue_ent *qe) /* play the announcement */ res = play_file(qe->chan, qe->parent->sound_periodicannounce[qe->last_periodic_announce_sound]); - if (res > 0 && !valid_exit(qe, res)) + if ((res > 0 && !valid_exit(qe, res)) || res < 0) res = 0; /* Resume Music on Hold if the caller is going to stay in the queue */