Add a bunch of APNs
Fork of C027_Support by
Diff: MDM.cpp
- Revision:
- 115:d8d94b73c725
- Parent:
- 112:89b5b21db71e
- Child:
- 117:74e4e0109a9e
diff -r e347ed0fab5e -r d8d94b73c725 MDM.cpp --- a/MDM.cpp Thu Nov 06 09:06:37 2014 +0000 +++ b/MDM.cpp Mon Dec 15 08:33:54 2014 +0000 @@ -1314,12 +1314,19 @@ // ---------------------------------------------------------------- +int MDMParser::_cbUDELFILE(int type, const char* buf, int len, void*) +{ + if ((type == TYPE_ERROR) && strstr(buf, "+CME ERROR: FILE NOT FOUND")) + return RESP_OK; // file does not exist, so all ok... + return WAIT; +} + bool MDMParser::delFile(const char* filename) { bool ok = false; LOCK(); sendFormated("AT+UDELFILE=\"%s\"\r\n", filename); - ok = (RESP_OK == waitFinalResp()); + ok = (RESP_OK == waitFinalResp(_cbUDELFILE)); UNLOCK(); return ok; }