mirror of
				https://github.com/Telecominfraproject/wlan-ap.git
				synced 2025-10-31 02:17:58 +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:
		 Marek Kwaczynski
					Marek Kwaczynski
				
			
				
					committed by
					
						 John Crispin
						John Crispin
					
				
			
			
				
	
			
			
			 John Crispin
						John Crispin
					
				
			
						parent
						
							53ff49eb6f
						
					
				
				
					commit
					4d55d427d7
				
			| @@ -142,7 +142,7 @@ function freq2chan(freq) { | |||||||
|  * { "ifname": "wlan1", "freq": 5180, "bssid": "XX:XX:XX:XX:XX:XX" |  * { "ifname": "wlan1", "freq": 5180, "bssid": "XX:XX:XX:XX:XX:XX" | ||||||
|  */ |  */ | ||||||
| function handle_channel_switch(hapd, notify) { | function handle_channel_switch(hapd, notify) { | ||||||
| 	if (!notify && !notify?.data && !notify.data?.freq) | 	if (!notify || !notify?.data || !notify.data?.freq) | ||||||
| 		return; | 		return; | ||||||
|  |  | ||||||
| 	let ch = freq2chan(notify.data.freq); | 	let ch = freq2chan(notify.data.freq); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user