don't drop the caller just because it's not time to play an announcement (issue ...
authorKevin P. Fleming <kpfleming@digium.com>
Mon, 26 Sep 2005 00:41:28 +0000 (00:41 +0000)
committerKevin P. Fleming <kpfleming@digium.com>
Mon, 26 Sep 2005 00:41:28 +0000 (00:41 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6655 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_queue.c

index 558f40c..3f7c161 100755 (executable)
@@ -1516,8 +1516,8 @@ static int say_periodic_announcement(struct queue_ent *qe)
        time(&now);
 
        /* Check to see if it is time to announce */
-       if ( (now - qe->last_periodic_announce_time) < qe->parent->periodicannouncefrequency )
-               return -1;
+       if ((now - qe->last_periodic_announce_time) < qe->parent->periodicannouncefrequency)
+               return 0;
 
        /* Stop the music on hold so we can play our own file */
        ast_moh_stop(qe->chan);
@@ -1534,7 +1534,7 @@ static int say_periodic_announcement(struct queue_ent *qe)
        /* update last_periodic_announce_time */
        qe->last_periodic_announce_time = now;
 
-       return(res);
+       return res;
 }
 
 static void record_abandoned(struct queue_ent *qe)