From d3f7c5fb748b9b70a77aaf867a7f20ccd7ab180a Mon Sep 17 00:00:00 2001
From: "Kevin P. Fleming" <kpfleming@digium.com>
Date: Mon, 26 Sep 2005 00:41:28 +0000
Subject: [PATCH] don't drop the caller just because it's not time to play an
 announcement (issue #5279)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6655 65c4cc65-6c06-0410-ace0-fbb531ad65f3
---
 apps/app_queue.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/apps/app_queue.c b/apps/app_queue.c
index 558f40c6dc..3f7c1614b1 100755
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -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)
-- 
GitLab