Add a bunch of APNs
Fork of C027_Support by
Diff: MDM.cpp
- Revision:
- 82:055dcfcf9dcc
- Parent:
- 81:3966a5c17037
- Child:
- 84:a05edb010176
--- a/MDM.cpp Wed May 28 07:09:38 2014 +0000 +++ b/MDM.cpp Wed May 28 07:14:21 2014 +0000 @@ -558,7 +558,7 @@ INFO("Start device over-the-air activation (this can take a few minutes)\r\n"); sendFormated("AT+CDV=*22899\r\n"); i = 1; - if (RESP_OK != waitFinalResp(_cbUACTIND, &i, 120*1000) || (i == 1)) { + if ((RESP_OK != waitFinalResp(_cbUACTIND, &i, 120*1000)) || (i == 1)) { ERROR("Device over-the-air activation failed\r\n"); return false; } @@ -567,7 +567,7 @@ INFO("Start PRL over-the-air update (this can take a few minutes)\r\n"); sendFormated("AT+CDV=*22891\r\n"); i = 1; - if (RESP_OK != waitFinalResp(_cbUACTIND, &i, 120*1000) || (i == 1)) { + if ((RESP_OK != waitFinalResp(_cbUACTIND, &i, 120*1000)) || (i == 1)) { ERROR("PRL over-the-air update failed\r\n"); return false; } @@ -646,7 +646,9 @@ int MDMParser::_cbUACTIND(int type, const char* buf, int len, int* i) { if ((type == TYPE_PLUS) && i){ - if (sscanf(buf, "\r\n+UACTIND: %d", i) == 1) { + int a; + if (sscanf(buf, "\r\n+UACTIND: %d", &a) == 1) { + *i = a; } } return WAIT;