Skip to content
This repository has been archived by the owner on Nov 14, 2024. It is now read-only.

Commit

Permalink
[nrf noup] zephyr: Fix receive message length
Browse files Browse the repository at this point in the history
fixup! [nrf noup] Monitor supplicant state and inform applications

Sender is sending the entire structure, and receiving one byte lesser
results in two receive calls per-message, this screws up the message
parsing.

Fixes SHEL-2250.

Signed-off-by: Chaitanya Tata <[email protected]>
  • Loading branch information
krish2718 committed Dec 5, 2023
1 parent 163da14 commit fac9222
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion wpa_supplicant/wpa_cli_zephyr.c
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ static void wpa_cli_recv_pending(struct wpa_ctrl *ctrl)
{
while (wpa_ctrl_pending(ctrl) > 0) {
char buf[sizeof(struct conn_msg)];
size_t len = sizeof(buf) - 1;
size_t len = sizeof(buf);

if (wpa_ctrl_recv(ctrl, buf, &len) == 0) {
struct conn_msg *msg = (struct conn_msg *)buf;
Expand Down

0 comments on commit fac9222

Please sign in to comment.