]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
app_queue.c: Properly handle invalid strategies from realtime.
authorSean Bright <sean@seanbright.com>
Sat, 13 Apr 2024 17:30:22 +0000 (13:30 -0400)
committerSean Bright <sean@seanbright.com>
Wed, 17 Apr 2024 14:32:42 +0000 (14:32 +0000)
The existing code sets the queue strategy to `ringall` but it is then
immediately overwritten with an invalid one.

Fixes #707

apps/app_queue.c

index 918cb58da50183a78eecf656c11e6a8eca95962d..7406f9dfda27c5e2c5b1265d5bfbc0d48ace4279 100644 (file)
@@ -3487,7 +3487,7 @@ static void queue_set_param(struct call_queue *q, const char *param, const char
                if (strategy < 0) {
                        ast_log(LOG_WARNING, "'%s' isn't a valid strategy for queue '%s', using ringall instead\n",
                                val, q->name);
-                       q->strategy = QUEUE_STRATEGY_RINGALL;
+                       strategy = QUEUE_STRATEGY_RINGALL;
                }
                if (strategy == q->strategy) {
                        return;