summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorRichard Mudgett <rmudgett@digium.com>2017-09-28 17:37:15 -0500
committerRichard Mudgett <rmudgett@digium.com>2017-09-28 18:47:01 -0500
commit0945f10d3b797fa46ab95ecf3f1768283e53f12a (patch)
tree7f3a8f4ba93f475f5250e1550159268d60c10285 /apps
parentb6d5e9223ce35befb69ca1bc2a0e016e1542bf46 (diff)
app_queue.c: Fix announcements when announce-to-first-user not enabled.
The previous patch for ASTERISK-27216 made it so you wouldn't get any position or periodic announcements unless you had announce-to-first-user enabled. The announce-to-first-user feature was added by ASTERISK_21782 as a result of the patch which introduced the redundant announcements that ASTERISK-27216 removes. * By noting that the makeannouncement variable is used to suppresses the first user announcement, we set its initial value to the announce-to-first-user enable setting. ASTERISK-27216 Change-Id: Ieaeb7dbea8ae7073086b775fbafe0625b000b10a
Diffstat (limited to 'apps')
-rw-r--r--apps/app_queue.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/apps/app_queue.c b/apps/app_queue.c
index 04a4a040a..c4c3dbcc0 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -8042,7 +8042,7 @@ check_turns:
goto stop;
}
- makeannouncement = 0;
+ makeannouncement = qe.parent->announce_to_first_user;
for (;;) {
/* This is the wait loop for the head caller*/
@@ -8062,15 +8062,17 @@ check_turns:
if (makeannouncement) {
/* Make a position announcement, if enabled */
- if (qe.parent->announcefrequency && qe.parent->announce_to_first_user)
- if ((res = say_position(&qe,ringing)))
+ if (qe.parent->announcefrequency) {
+ if ((res = say_position(&qe, ringing))) {
goto stop;
+ }
+ }
}
makeannouncement = 1;
/* Make a periodic announcement, if enabled */
- if (qe.parent->periodicannouncefrequency && qe.parent->announce_to_first_user) {
- if ((res = say_periodic_announcement(&qe,ringing))) {
+ if (qe.parent->periodicannouncefrequency) {
+ if ((res = say_periodic_announcement(&qe, ringing))) {
goto stop;
}
}