]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Allow autofill to work in the general section of queues.conf.
authorJason Parker <jparker@digium.com>
Tue, 15 Apr 2008 16:18:08 +0000 (16:18 +0000)
committerJason Parker <jparker@digium.com>
Tue, 15 Apr 2008 16:18:08 +0000 (16:18 +0000)
Additionally, don't try to (re)set options when they have empty values in realtime (all unset columns would have an empty value).

(closes issue #12445)
Reported by: atis
Patches:
      12445-autofill.diff uploaded by qwell (license 4)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@114133 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_queue.c

index d35ece846a4fe7333fb15661ef8225a3fe2d0bdc..08e85c02fbd08b39bfe5f91b63f1768b099ce314 100644 (file)
@@ -822,7 +822,6 @@ static void init_queue(struct call_queue *q)
        q->reportholdtime = 0;
        q->monjoin = 0;
        q->wrapuptime = 0;
-       q->autofill = 0;
        q->joinempty = 0;
        q->leavewhenempty = 0;
        q->memberdelay = 0;
@@ -1243,7 +1242,11 @@ static struct call_queue *find_queue_by_name_rt(const char *queuename, struct as
                                *tmp++ = '-';
                } else
                        tmp_name = v->name;
-               queue_set_param(q, tmp_name, v->value, -1, 0);
+
+               if (!ast_strlen_zero(v->value)) {
+                       /* Don't want to try to set the option if the value is empty */
+                       queue_set_param(q, tmp_name, v->value, -1, 0);
+               }
        }
 
        if (q->strategy == QUEUE_STRATEGY_ROUNDROBIN)