Own fork of C027_Support

Dependents:   MbedSmartRestMain MbedSmartRestMain

Fork of C027_Support by u-blox

Revision:
108:254bf037f83f
Parent:
106:18aeacdae391
Child:
109:327d209a8ab9
--- a/MDM.cpp	Tue Aug 12 08:43:15 2014 +0000
+++ b/MDM.cpp	Mon Sep 15 11:51:49 2014 +0000
@@ -882,9 +882,9 @@
 int MDMParser::_cbUSOCR(int type, const char* buf, int len, int* handle)
 {
     if ((type == TYPE_PLUS) && handle) {
-        const char* p = strstr(buf,"+USOCR: "); 
-        if (p)
-            *handle = atoi(p+8);
+        // +USOCR: socket
+        if (sscanf(buf, "\r\n+USOCR: %d", handle) == 1)
+            /*nothing*/;  
     }
     return WAIT;
 }