drivers: wifi: esp_at: only log errors in active mode with full IPD

Removes constant error logging when parsing IPD headers in active mode and
waiting on remote IP and port. Currently an error message is logged for
every character in the remote IP and port until the full length obtained.

Signed-off-by: Daniel Mangum <georgedanielmangum@gmail.com>
This commit is contained in:
Daniel Mangum 2024-09-04 12:38:18 -04:00 committed by Mahesh Mahadevan
parent bce1193e45
commit a80af336c2
1 changed files with 8 additions and 2 deletions

View File

@ -825,13 +825,19 @@ static int cmd_ipd_parse_hdr(struct esp_data *dev,
err = esp_pull_quoted(&str, str_end, &remote_ip);
if (err) {
if (err == -EAGAIN && match_len >= MAX_IPD_LEN) {
LOG_ERR("Failed to pull remote_ip");
err = -EBADMSG;
}
goto socket_unref;
}
err = esp_pull_long(&str, str_end, &port);
if (err) {
if (err == -EAGAIN && match_len >= MAX_IPD_LEN) {
LOG_ERR("Failed to pull port");
err = -EBADMSG;
}
goto socket_unref;
}