<p>Friendly Automation <strong>submitted</strong> this change.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/20061">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span></span><br></pre><div style="white-space:pre-wrap">Approvals:
Joshua Colp: Looks good to me, approved
Sean Bright: Looks good to me, but someone else must approve
Friendly Automation: Approved for Submit
</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">Revert "app_queue: periodic announcement configurable start time."<br><br>This reverts commit 71e317f68f246939bde469609bbe573937232c7d.<br><br>Reason for revert: Causes segmentation fault.<br><br>Change-Id: I3beeda83249bffec2a8f246aa50a6b2f1b59ef59<br>---<br>M apps/app_queue.c<br>M configs/samples/queues.conf.sample<br>D doc/CHANGES-staging/app_queue.txt<br>3 files changed, 13 insertions(+), 24 deletions(-)<br><br></pre>
<pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/apps/app_queue.c b/apps/app_queue.c</span><br><span>index d4362ae..9eebb2f 100644</span><br><span>--- a/apps/app_queue.c</span><br><span>+++ b/apps/app_queue.c</span><br><span>@@ -1836,7 +1836,6 @@</span><br><span> int announcepositionlimit; /*!< How many positions we announce? */</span><br><span> int announcefrequency; /*!< How often to announce their position */</span><br><span> int minannouncefrequency; /*!< The minimum number of seconds between position announcements (def. 15) */</span><br><span style="color: hsl(0, 100%, 40%);">- int periodicannouncestartdelay; /*!< How long into the queue should the periodic accouncement start */</span><br><span> int periodicannouncefrequency; /*!< How often to play periodic announcement */</span><br><span> int numperiodicannounce; /*!< The number of periodic announcements configured */</span><br><span> int randomperiodicannounce; /*!< Are periodic announcments randomly chosen */</span><br><span>@@ -2965,7 +2964,6 @@</span><br><span> q->weight = 0;</span><br><span> q->timeoutrestart = 0;</span><br><span> q->periodicannouncefrequency = 0;</span><br><span style="color: hsl(0, 100%, 40%);">- q->periodicannouncestartdelay = -1;</span><br><span> q->randomperiodicannounce = 0;</span><br><span> q->numperiodicannounce = 0;</span><br><span> q->relativeperiodicannounce = 0;</span><br><span>@@ -3422,8 +3420,6 @@</span><br><span> ast_str_set(&q->sound_periodicannounce[0], 0, "%s", val);</span><br><span> q->numperiodicannounce = 1;</span><br><span> }</span><br><span style="color: hsl(0, 100%, 40%);">- } else if (!strcasecmp(param, "periodic-announce-startdelay")) {</span><br><span style="color: hsl(0, 100%, 40%);">- q->periodicannouncestartdelay = atoi(val);</span><br><span> } else if (!strcasecmp(param, "periodic-announce-frequency")) {</span><br><span> q->periodicannouncefrequency = atoi(val);</span><br><span> } else if (!strcasecmp(param, "relative-periodic-announce")) {</span><br><span>@@ -8523,10 +8519,6 @@</span><br><span> qe.last_pos_said = 0;</span><br><span> qe.last_pos = 0;</span><br><span> qe.last_periodic_announce_time = time(NULL);</span><br><span style="color: hsl(0, 100%, 40%);">- if (qe.parent->periodicannouncestartdelay >= 0) {</span><br><span style="color: hsl(0, 100%, 40%);">- qe.last_periodic_announce_time += qe.parent->periodicannouncestartdelay;</span><br><span style="color: hsl(0, 100%, 40%);">- qe.last_periodic_announce_time -= qe.parent->periodicannouncefrequency;</span><br><span style="color: hsl(0, 100%, 40%);">- }</span><br><span> qe.last_periodic_announce_sound = 0;</span><br><span> qe.valid_digits = 0;</span><br><span> if (join_queue(args.queuename, &qe, &reason, position)) {</span><br><span>diff --git a/configs/samples/queues.conf.sample b/configs/samples/queues.conf.sample</span><br><span>index 7b5fe0b..0987236 100644</span><br><span>--- a/configs/samples/queues.conf.sample</span><br><span>+++ b/configs/samples/queues.conf.sample</span><br><span>@@ -278,13 +278,6 @@</span><br><span> ;</span><br><span> ;periodic-announce-frequency=60</span><br><span> ;</span><br><span style="color: hsl(0, 100%, 40%);">-; If given indicates the number of seconds after entering the queue the first</span><br><span style="color: hsl(0, 100%, 40%);">-; periodic announcement should be played. The default (and historic) behavior</span><br><span style="color: hsl(0, 100%, 40%);">-; is to play the first periodic announcement at periodic-announce-frequency</span><br><span style="color: hsl(0, 100%, 40%);">-; seconds after entering the queue.</span><br><span style="color: hsl(0, 100%, 40%);">-;</span><br><span style="color: hsl(0, 100%, 40%);">-;periodic-announce-startdelay=10</span><br><span style="color: hsl(0, 100%, 40%);">-;</span><br><span> ; Should the periodic announcements be played in a random order? Default is no.</span><br><span> ;</span><br><span> ;random-periodic-announce=no</span><br><span>diff --git a/doc/CHANGES-staging/app_queue.txt b/doc/CHANGES-staging/app_queue.txt</span><br><span>deleted file mode 100644</span><br><span>index f71bcb0..0000000</span><br><span>--- a/doc/CHANGES-staging/app_queue.txt</span><br><span>+++ /dev/null</span><br><span>@@ -1,9 +0,0 @@</span><br><span style="color: hsl(0, 100%, 40%);">-Subject: app_queue</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-Introduce a new queue configuration option called</span><br><span style="color: hsl(0, 100%, 40%);">-'periodic-announce-startdelay' which will vary the normal (historic) behavior</span><br><span style="color: hsl(0, 100%, 40%);">-of starting the periodic announcement cycle at periodic-announce-frequency</span><br><span style="color: hsl(0, 100%, 40%);">-seconds after entering the queue to start the periodic announcement cycle at</span><br><span style="color: hsl(0, 100%, 40%);">-period-announce-startdelay seconds after joining the queue.</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-The default behavior if this config option is not set remains unchanged.</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/20061">change 20061</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/c/asterisk/+/20061"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I3beeda83249bffec2a8f246aa50a6b2f1b59ef59 </div>
<div style="display:none"> Gerrit-Change-Number: 20061 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: Joshua Colp <jcolp@sangoma.com> </div>
<div style="display:none"> Gerrit-Reviewer: Benjamin Keith Ford <bford@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Friendly Automation </div>
<div style="display:none"> Gerrit-Reviewer: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jaco Kroon <jaco@uls.co.za> </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@sangoma.com> </div>
<div style="display:none"> Gerrit-Reviewer: N A <asterisk@phreaknet.org> </div>
<div style="display:none"> Gerrit-Reviewer: Sean Bright <sean@seanbright.com> </div>
<div style="display:none"> Gerrit-MessageType: merged </div>