drivers: wifi: fix an unchecked return
Log error and return false if recv() has not received packet in the buffer. Signed-off-by: Niranjhana N <niranjhana.n@intel.com>
This commit is contained in:
parent
16451850e7
commit
9e895acf4e
1 changed files with 5 additions and 2 deletions
|
@ -822,8 +822,11 @@ static bool handle_socket_msg_recv(SOCKET sock,
|
|||
return false;
|
||||
}
|
||||
|
||||
recv(sock, sd->pkt_buf->data,
|
||||
CONFIG_WIFI_WINC1500_MAX_PACKET_SIZE, K_NO_WAIT);
|
||||
if (recv(sock, sd->pkt_buf->data,
|
||||
CONFIG_WIFI_WINC1500_MAX_PACKET_SIZE, K_NO_WAIT)) {
|
||||
LOG_ERR("Could not receive packet in the buffer");
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue