diff --git a/examples/protocols/pppos_client/components/modem/src/esp_modem.c b/examples/protocols/pppos_client/components/modem/src/esp_modem.c index 4217f136a5..2cb38c17fe 100644 --- a/examples/protocols/pppos_client/components/modem/src/esp_modem.c +++ b/examples/protocols/pppos_client/components/modem/src/esp_modem.c @@ -60,15 +60,15 @@ typedef struct { } esp_modem_dte_t; /** - * @brief Returns true if the supplied string contains only CR or LF + * @brief Returns true if the supplied string contains only characters * * @param str string to check * @param len length of string */ -static inline bool is_only_cr_lf(const char *str, uint32_t len) +static inline bool is_only_cr(const char *str, uint32_t len) { for (int i=0; i 2 && !is_only_cr_lf(p, plen)) { + if (plen > 1 && !is_only_cr(p, plen)) { ESP_LOGD(MODEM_TAG, "Handling line: >>%s\n<<", p); if (dce->handle_line == NULL) { /* Received an asynchronous line, but no handler waiting this this */