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.
Dependencies: mbed FXOS8700CQ MODSERIAL
Diff: wnc_control.cpp
- Revision:
- 44:c95a85b5cf92
- Parent:
- 43:6821a9c78c4b
- Child:
- 45:a836eecd5d12
diff -r 6821a9c78c4b -r c95a85b5cf92 wnc_control.cpp
--- a/wnc_control.cpp Sun Jul 24 16:58:17 2016 +0000
+++ b/wnc_control.cpp Sun Jul 24 17:45:30 2016 +0000
@@ -135,9 +135,6 @@
{
unsigned n = 0;
- // Clean slate:
- sockData->erase();
-
if (socketOpen == 1)
{
do
@@ -156,7 +153,10 @@
} while (WNC_MDM_ERR == WNC_NO_RESPONSE);
}
else
+ {
puts("Socket is closed for read\r\n");
+ sockData->erase();
+ }
return (n);
}
@@ -269,11 +269,13 @@
{
if (check_wnc_ready() < 0)
{
+ static string noRespStr("");
string truncStr(s, 50);
pc.puts("FAIL send cmd: ");
pc.puts(truncStr.c_str());
pc.puts("\r\n");
WNC_MDM_ERR = WNC_NO_RESPONSE;
+ *r = &noRespStr;
return (-2);
}
@@ -477,6 +479,9 @@
string * pRespStr;
string cmd_str("AT@SOCKREAD=1,");
+ // Clean slate
+ pS->erase();
+
if (n <= 1500)
{
char num2str[6];