app_queue: Added initialization for "context" parameter

When using Asterisk Realtime Architecture, empty fields are skipped and the
default values are used. If the "context" parameter in queue was set and then
cleared from the database, the old value remains in memory and it continues
to be used. This change initialize the "context" parameter with an empty value,
allowing clearing the parameter.

ASTERISK-26462 #close

Change-Id: I64be73d5044ce38dd02408bd0e53de965ef65905
This commit is contained in:
Leandro Dardini
2016-10-13 21:09:18 +02:00
committed by Kevin Harwell
parent 3633c7926c
commit 0306869399

View File

@@ -2646,6 +2646,9 @@ static void init_queue(struct call_queue *q)
q->retry = DEFAULT_RETRY; q->retry = DEFAULT_RETRY;
q->timeout = DEFAULT_TIMEOUT; q->timeout = DEFAULT_TIMEOUT;
q->maxlen = 0; q->maxlen = 0;
ast_string_field_set(q, context, "");
q->announcefrequency = 0; q->announcefrequency = 0;
q->minannouncefrequency = DEFAULT_MIN_ANNOUNCE_FREQUENCY; q->minannouncefrequency = DEFAULT_MIN_ANNOUNCE_FREQUENCY;
q->announceholdtime = 1; q->announceholdtime = 1;