From 54bd620fb12b785cc927bb1abe02b4490e160d86 Mon Sep 17 00:00:00 2001 From: George Joseph Date: Wed, 8 Oct 2025 07:42:41 -0600 Subject: [PATCH] chan_websocket.c: Change payload references to command instead. Some of the tests in process_text_message() were still comparing to the websocket message payload instead of the "command" string. Resolves: #1525 --- channels/chan_websocket.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/channels/chan_websocket.c b/channels/chan_websocket.c index eb680d570c..7357005cc1 100644 --- a/channels/chan_websocket.c +++ b/channels/chan_websocket.c @@ -577,7 +577,7 @@ static int process_text_message(struct websocket_pvt *instance, instance->leftover_len = 0; AST_LIST_UNLOCK(&instance->frame_queue); - } else if (ast_strings_equal(payload, REPORT_QUEUE_DRAINED)) { + } else if (ast_strings_equal(command, REPORT_QUEUE_DRAINED)) { if (instance->passthrough) { ast_debug(4, "%s: WebSocket in passthrough mode. Ignoring %s command.\n", ast_channel_name(instance->channel), command); @@ -609,7 +609,7 @@ static int process_text_message(struct websocket_pvt *instance, ast_free(status); } - } else if (ast_strings_equal(payload, PAUSE_MEDIA)) { + } else if (ast_strings_equal(command, PAUSE_MEDIA)) { if (instance->passthrough) { ast_debug(4, "%s: WebSocket in passthrough mode. Ignoring %s command.\n", ast_channel_name(instance->channel), command); @@ -619,7 +619,7 @@ static int process_text_message(struct websocket_pvt *instance, instance->queue_paused = 1; AST_LIST_UNLOCK(&instance->frame_queue); - } else if (ast_strings_equal(payload, CONTINUE_MEDIA)) { + } else if (ast_strings_equal(command, CONTINUE_MEDIA)) { if (instance->passthrough) { ast_debug(4, "%s: WebSocket in passthrough mode. Ignoring %s command.\n", ast_channel_name(instance->channel), command);