Added HTTP API to C027_Support library.
Fork of C027_Support by
Revision 115:d8d94b73c725, committed 2014-12-15
- Comitter:
- mazgch
- Date:
- Mon Dec 15 08:33:54 2014 +0000
- Parent:
- 114:e347ed0fab5e
- Child:
- 116:709a6386e685
- Commit message:
- delete to a non-existing file returns true now
Changed in this revision
MDM.cpp | Show annotated file Show diff for this revision Revisions of this file |
MDM.h | Show annotated file Show diff for this revision Revisions of this file |
--- 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; }
--- a/MDM.h Thu Nov 06 09:06:37 2014 +0000 +++ b/MDM.h Mon Dec 15 08:33:54 2014 +0000 @@ -538,6 +538,7 @@ static int _cbCMGR(int type, const char* buf, int len, CMGRparam* param); // file typedef struct { const char* filename; char* buf; int sz; int len; } URDFILEparam; + static int _cbUDELFILE(int type, const char* buf, int len, void*); static int _cbURDFILE(int type, const char* buf, int len, URDFILEparam* param); // variables DevStatus _dev; //!< collected device information