Added HTTP API to C027_Support library.
Fork of C027_Support by
Revision 108:254bf037f83f, committed 2014-09-15
- Comitter:
- mazgch
- Date:
- Mon Sep 15 11:51:49 2014 +0000
- Parent:
- 106:18aeacdae391
- Child:
- 109:327d209a8ab9
- Commit message:
- better parsing
Changed in this revision
MDM.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- 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; }