mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-10-29 17:42:41 +00:00
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 <marek@shasta.cloud>
This commit is contained in:
committed by
John Crispin
parent
53ff49eb6f
commit
4d55d427d7
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user