From 4d55d427d71d45150390c50295222190748e0172 Mon Sep 17 00:00:00 2001 From: Marek Kwaczynski Date: Fri, 7 Mar 2025 15:45:36 +0100 Subject: [PATCH] ucentral-event: fix null pointers checking in channel switch Invalid logical operator was used for checking null pointers in channel_switch function: AND instead OR Fixes: 7477963b ("ucentral-event: add channel switch handler") Signed-off-by: Marek Kwaczynski --- feeds/ucentral/ucentral-event/files/ucentral-event | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/feeds/ucentral/ucentral-event/files/ucentral-event b/feeds/ucentral/ucentral-event/files/ucentral-event index ad1fe5f70..b42a02ab3 100755 --- a/feeds/ucentral/ucentral-event/files/ucentral-event +++ b/feeds/ucentral/ucentral-event/files/ucentral-event @@ -142,7 +142,7 @@ function freq2chan(freq) { * { "ifname": "wlan1", "freq": 5180, "bssid": "XX:XX:XX:XX:XX:XX" */ function handle_channel_switch(hapd, notify) { - if (!notify && !notify?.data && !notify.data?.freq) + if (!notify || !notify?.data || !notify.data?.freq) return; let ch = freq2chan(notify.data.freq);