diff options
| author | chenyong <[email protected]> | 2018-08-03 19:07:28 +0800 |
|---|---|---|
| committer | chenyong <[email protected]> | 2018-08-03 19:10:35 +0800 |
| commit | 2e8d994485552ae143841569c3444bb65db55cdf (patch) | |
| tree | 54bab7ca00b436f375d18562a2a95a0886c5d2fe /components | |
| parent | f5d9276434c1ab7d16bab8e22d5908a126477240 (diff) | |
[net][at] Modify the AT commands response ERROR judgment method.
Diffstat (limited to 'components')
| -rw-r--r-- | components/net/at/include/at.h | 2 | ||||
| -rw-r--r-- | components/net/at/src/at_client.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/components/net/at/include/at.h b/components/net/at/include/at.h index 76e952944f..782cb0c400 100644 --- a/components/net/at/include/at.h +++ b/components/net/at/include/at.h @@ -27,7 +27,7 @@ #include <rtthread.h> -#define AT_SW_VERSION "0.2.2" +#define AT_SW_VERSION "0.2.3" #define DBG_ENABLE #define DBG_SECTION_NAME "AT" diff --git a/components/net/at/src/at_client.c b/components/net/at/src/at_client.c index dd866fdcb0..90fd3291c3 100644 --- a/components/net/at/src/at_client.c +++ b/components/net/at/src/at_client.c @@ -547,7 +547,7 @@ static void client_parser(at_client_t client) /* get the end data by response result, return response state END_OK. */ client->resp_status = AT_RESP_OK; } - else if ((memcmp(client->recv_buffer, AT_RESP_END_ERROR, strlen(AT_RESP_END_ERROR)) == 0) + else if (strstr(client->recv_buffer, AT_RESP_END_ERROR) || (memcmp(client->recv_buffer, AT_RESP_END_FAIL, strlen(AT_RESP_END_FAIL)) == 0)) { client->resp_status = AT_RESP_ERROR; |
