summaryrefslogtreecommitdiff
path: root/fw/esp32/components/eos/at_cmd.c
diff options
context:
space:
mode:
Diffstat (limited to 'fw/esp32/components/eos/at_cmd.c')
-rw-r--r--fw/esp32/components/eos/at_cmd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fw/esp32/components/eos/at_cmd.c b/fw/esp32/components/eos/at_cmd.c
index 82baa92..37de990 100644
--- a/fw/esp32/components/eos/at_cmd.c
+++ b/fw/esp32/components/eos/at_cmd.c
@@ -149,17 +149,17 @@ int at_expect_match(char *str_ok, char *str_err, char **buf, regmatch_t match[],
return rv;
}
- ESP_LOGI(TAG, "Expect: %s", at_buf);
+ if (strlen(at_buf)) ESP_LOGI(TAG, "Expect: %s", at_buf);
if (str_ok && (regexec(&re_ok, at_buf, match_size, match, 0) == 0)) {
regfree(&re_ok);
if (str_err) regfree(&re_err);
- return 1;
+ return 0;
}
if (str_err && (regexec(&re_err, at_buf, match_size, match, 0) == 0)) {
if (str_ok) regfree(&re_ok);
regfree(&re_err);
- return 0;
+ return 1;
}
at_urc_process(at_buf);