summaryrefslogtreecommitdiff
path: root/apps/app_queue.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/app_queue.c')
-rw-r--r--apps/app_queue.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/apps/app_queue.c b/apps/app_queue.c
index 0e57ec4e1..7cd3b9ed8 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -1747,8 +1747,13 @@ static void init_queue(struct call_queue *q)
ast_string_field_set(q, sound_thanks, "queue-thankyou");
ast_string_field_set(q, sound_reporthold, "queue-reporthold");
- if ((q->sound_periodicannounce[0] = ast_str_create(32)))
+ if (!q->sound_periodicannounce[0]) {
+ q->sound_periodicannounce[0] = ast_str_create(32);
+ }
+
+ if (q->sound_periodicannounce[0]) {
ast_str_set(&q->sound_periodicannounce[0], 0, "queue-periodic-announce");
+ }
for (i = 1; i < MAX_PERIODIC_ANNOUNCEMENTS; i++) {
if (q->sound_periodicannounce[i])