samples: hci_uart_async: Dont try to receive 0 bytes
It is not necessary and it ends up in an nrfx assert. Signed-off-by: Herman Berget <herman.berget@nordicsemi.no>
This commit is contained in:
parent
f73af06f2b
commit
976da5da5c
1 changed files with 3 additions and 1 deletions
|
@ -254,7 +254,9 @@ static void h2c_h4_transport(void)
|
|||
|
||||
LOG_DBG("h2c: payload_size %u", payload_size);
|
||||
|
||||
if (payload_size <= net_buf_tailroom(buf)) {
|
||||
if (payload_size == 0) {
|
||||
/* Done, dont rx zero bytes */
|
||||
} else if (payload_size <= net_buf_tailroom(buf)) {
|
||||
uint8_t *payload_dst = net_buf_add(buf, payload_size);
|
||||
|
||||
err = uart_h2c_rx(payload_dst, payload_size);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue