From: Sean Bright Date: Sat, 13 Apr 2024 17:30:22 +0000 (-0400) Subject: app_queue.c: Properly handle invalid strategies from realtime. X-Git-Tag: 21.3.0-rc1~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5f07b095f2dbd94424fc861d75b9d6a3edb67bc6;p=thirdparty%2Fasterisk.git app_queue.c: Properly handle invalid strategies from realtime. The existing code sets the queue strategy to `ringall` but it is then immediately overwritten with an invalid one. Fixes #707 (cherry picked from commit 6914c93791062f8841e0062b5bab8fa6406f7bef) --- diff --git a/apps/app_queue.c b/apps/app_queue.c index 918cb58da5..7406f9dfda 100644 --- a/apps/app_queue.c +++ b/apps/app_queue.c @@ -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;