Customized
Dependents: MurataTypeYD_RPC_Sample
Fork of SNICInterface_mod by
Diff: SNIC_WifiInterface.cpp
- Revision:
- 43:d80bbb12ffe6
- Parent:
- 40:b6b10c22a121
- Child:
- 47:62ba69ff80d2
diff -r 17d89443d899 -r d80bbb12ffe6 SNIC_WifiInterface.cpp --- a/SNIC_WifiInterface.cpp Fri Sep 19 01:46:17 2014 +0000 +++ b/SNIC_WifiInterface.cpp Fri Nov 14 00:52:31 2014 +0000 @@ -211,15 +211,21 @@ int ret; // Wait UART response ret = uartCmdMgr_p->wait(); - if( ret != 0 ) + if(uartCmdMgr_p->getCommandStatus() != UART_CMD_RES_WIFI_ERR_ALREADY_JOINED) + { + DEBUG_PRINT( "Already connected\r\n" ); + } + else { - DEBUG_PRINT( "join failed\r\n" ); - snic_core_p->freeCmdBuf( payload_buf_p ); - return -1; + if( ret != 0 ) + { + DEBUG_PRINT( "join failed\r\n" ); + snic_core_p->freeCmdBuf( payload_buf_p ); + return -1; + } } - if( (uartCmdMgr_p->getCommandStatus() != 0) && - (uartCmdMgr_p->getCommandStatus() != UART_CMD_RES_WIFI_ERR_ALREADY_JOINED) ) + if(uartCmdMgr_p->getCommandStatus() != 0) { DEBUG_PRINT("join status:%02x\r\n", uartCmdMgr_p->getCommandStatus()); snic_core_p->freeCmdBuf( payload_buf_p );