Skip to content

Commit

Permalink
drivers: wifi: esp_at: only log errors in active mode with full IPD
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
hasheddan authored and mmahadevan108 committed Sep 6, 2024
1 parent bce1193 commit a80af33
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions drivers/wifi/esp_at/esp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
LOG_ERR("Failed to pull remote_ip");
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) {
LOG_ERR("Failed to pull port");
if (err == -EAGAIN && match_len >= MAX_IPD_LEN) {
LOG_ERR("Failed to pull port");
err = -EBADMSG;
}
goto socket_unref;
}

Expand Down

0 comments on commit a80af33

Please sign in to comment.