Skip to content

Commit

Permalink
Improvements in Wifi scan exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
josesimoes committed Nov 15, 2022
1 parent 77e1e25 commit 9be414f
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -192,24 +192,24 @@ HRESULT Library_sys_dev_wifi_native_System_Device_Wifi_WifiAdapter::NativeScanAs

switch (startScanResult)
{
case StartScanOutcome_FailedToGetConfiguration:
NANOCLR_SET_AND_LEAVE(CLR_E_FAIL);
break;

case StartScanOutcome_WrongInterfaceType:
case StartScanOutcome_Esp32WifiNotInit:
case StartScanOutcome_Esp32WifiNotStarted:
case StartScanOutcome_Esp32WifiState:
NANOCLR_SET_AND_LEAVE(CLR_E_INVALID_OPERATION);
break;

case StartScanOutcome_Esp32WifiState:
NANOCLR_SET_AND_LEAVE(CLR_E_BUSY);
break;

case StartScanOutcome_Esp32WifiTimeout:
NANOCLR_SET_AND_LEAVE(CLR_E_TIMEOUT);
break;

case StartScanOutcome_FailedToGetConfiguration:
default:
debug_printf("START SCAN error %d", startScanResult);
NANOCLR_SET_AND_LEAVE(CLR_E_UNKNOWN_TYPE);
NANOCLR_SET_AND_LEAVE(CLR_E_FAIL);
break;
}

Expand Down

0 comments on commit 9be414f

Please sign in to comment.