From 9c5f5358d7ce994b1b9fed073e618dda3d2d921e Mon Sep 17 00:00:00 2001 From: Joshua Colp Date: Tue, 11 Apr 2023 18:37:37 -0500 Subject: [PATCH] Revert "app_queue: periodic announcement configurable start time." This reverts commit 3fd0b65bae4b1b14434737ffcf0da4aa9ff717f6. Reason for revert: Causes segmentation fault. Change-Id: Ic189c6f7872943a5500d3e71142f0c09d54fcc31 (cherry picked from commit de15852ef01e9512f822656d2c7b27cf4d2678f5) --- apps/app_queue.c | 8 -------- configs/samples/queues.conf.sample | 7 ------- doc/CHANGES-staging/app_queue.txt | 9 --------- 3 files changed, 24 deletions(-) delete mode 100644 doc/CHANGES-staging/app_queue.txt diff --git a/apps/app_queue.c b/apps/app_queue.c index df563fffbc..31d63aa280 100644 --- a/apps/app_queue.c +++ b/apps/app_queue.c @@ -1853,7 +1853,6 @@ struct call_queue { int announcepositionlimit; /*!< How many positions we announce? */ int announcefrequency; /*!< How often to announce their position */ int minannouncefrequency; /*!< The minimum number of seconds between position announcements (def. 15) */ - int periodicannouncestartdelay; /*!< How long into the queue should the periodic accouncement start */ int periodicannouncefrequency; /*!< How often to play periodic announcement */ int numperiodicannounce; /*!< The number of periodic announcements configured */ int randomperiodicannounce; /*!< Are periodic announcments randomly chosen */ @@ -2985,7 +2984,6 @@ static void init_queue(struct call_queue *q) q->weight = 0; q->timeoutrestart = 0; q->periodicannouncefrequency = 0; - q->periodicannouncestartdelay = -1; q->randomperiodicannounce = 0; q->numperiodicannounce = 0; q->relativeperiodicannounce = 0; @@ -3444,8 +3442,6 @@ static void queue_set_param(struct call_queue *q, const char *param, const char ast_str_set(&q->sound_periodicannounce[0], 0, "%s", val); q->numperiodicannounce = 1; } - } else if (!strcasecmp(param, "periodic-announce-startdelay")) { - q->periodicannouncestartdelay = atoi(val); } else if (!strcasecmp(param, "periodic-announce-frequency")) { q->periodicannouncefrequency = atoi(val); } else if (!strcasecmp(param, "relative-periodic-announce")) { @@ -8614,10 +8610,6 @@ static int queue_exec(struct ast_channel *chan, const char *data) qe.last_pos_said = 0; qe.last_pos = 0; qe.last_periodic_announce_time = time(NULL); - if (qe.parent->periodicannouncestartdelay >= 0) { - qe.last_periodic_announce_time += qe.parent->periodicannouncestartdelay; - qe.last_periodic_announce_time -= qe.parent->periodicannouncefrequency; - } qe.last_periodic_announce_sound = 0; qe.valid_digits = 0; if (join_queue(args.queuename, &qe, &reason, position)) { diff --git a/configs/samples/queues.conf.sample b/configs/samples/queues.conf.sample index d8308cae33..fbb5653203 100644 --- a/configs/samples/queues.conf.sample +++ b/configs/samples/queues.conf.sample @@ -291,13 +291,6 @@ monitor-type = MixMonitor ; ;periodic-announce-frequency=60 ; -; If given indicates the number of seconds after entering the queue the first -; periodic announcement should be played. The default (and historic) behavior -; is to play the first periodic announcement at periodic-announce-frequency -; seconds after entering the queue. -; -;periodic-announce-startdelay=10 -; ; Should the periodic announcements be played in a random order? Default is no. ; ;random-periodic-announce=no diff --git a/doc/CHANGES-staging/app_queue.txt b/doc/CHANGES-staging/app_queue.txt deleted file mode 100644 index f71bcb0dfa..0000000000 --- a/doc/CHANGES-staging/app_queue.txt +++ /dev/null @@ -1,9 +0,0 @@ -Subject: app_queue - -Introduce a new queue configuration option called -'periodic-announce-startdelay' which will vary the normal (historic) behavior -of starting the periodic announcement cycle at periodic-announce-frequency -seconds after entering the queue to start the periodic announcement cycle at -period-announce-startdelay seconds after joining the queue. - -The default behavior if this config option is not set remains unchanged.