]> 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:37 +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 06efc4ccc2a8471cd433ba3a4ebf61fd2ad79a27..75101ec4df1845abe1d4e823e646b62e99a297e3 100644 (file)
@@ -3513,7 +3513,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;