![](/media/cache/profiles/aa7fd480bd75d86948e7f7aac11d2704.jpg.50x50_q85.jpg)
support library for C027 helper functions for Buffer Pipes, Buffered Serial Port (rtos capable) and GPS parsing. It includes modem APIs for USSD, SMS and Sockets.
Fork of C027_Support by
Diff: MDM.cpp
- Revision:
- 108:254bf037f83f
- Parent:
- 106:18aeacdae391
- Child:
- 109:327d209a8ab9
diff -r 18aeacdae391 -r 254bf037f83f MDM.cpp --- 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; }