Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of NySNICInterface by
Diff: YDwifiInterface.cpp
- Revision:
- 7:e88ccbe0225f
- Parent:
- 6:70f522934032
diff -r 70f522934032 -r e88ccbe0225f YDwifiInterface.cpp
--- a/YDwifiInterface.cpp Thu Mar 13 10:33:18 2014 +0000
+++ b/YDwifiInterface.cpp Fri Mar 14 08:48:12 2014 +0000
@@ -267,13 +267,11 @@
strcpy( (char *)req.ssid, ssid_p );
buf_len += strlen(ssid_p);
}
- else
- {
- buf_len++;
- }
-
+ buf_len++;
+
// Make command payload
payload_len = C_YD_UartMsg::makePayload( buf_len, (unsigned char *)&req, payload_array );
+
// Make all command request
command_len = C_YD_UartMsg::makeRequest( UART_CMD_ID_WIFI, payload_array, payload_len, command_array );
@@ -286,7 +284,7 @@
// Send uart command request
sendUart( command_len, command_array );
-
+
// Wait UART response
ret = mUartCommand.wait();
printf( "scan wait:%d\r\n", ret );
@@ -302,6 +300,7 @@
printf("scan status:%02x\r\n", mUartCommand.getCommandStatus());
ret = -1;
}
+
gMEMPOOL_PAYLOAD.free( payload_buf );
return ret;
