]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
app_queue: Added initialization for "context" parameter 29/4129/1
authorLeandro Dardini <ldardini@gmail.com>
Thu, 13 Oct 2016 19:09:18 +0000 (21:09 +0200)
committerJoshua Colp <jcolp@digium.com>
Mon, 17 Oct 2016 13:15:13 +0000 (08:15 -0500)
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

apps/app_queue.c

index 591a293118e5778df5304d29a8271fe9a41d6439..4bbccc3469c8844b2dbc5b90f023e853b7041bea 100644 (file)
@@ -2671,6 +2671,9 @@ static void init_queue(struct call_queue *q)
        q->retry = DEFAULT_RETRY;
        q->timeout = DEFAULT_TIMEOUT;
        q->maxlen = 0;
+
+       ast_string_field_set(q, context, "");
+
        q->announcefrequency = 0;
        q->minannouncefrequency = DEFAULT_MIN_ANNOUNCE_FREQUENCY;
        q->announceholdtime = 1;