From 733f837aae243402950ac28f7acc53b3b3dc313a Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Mon, 25 Jan 2016 19:07:09 -0500 Subject: [PATCH] drivers/nble: Fix passing correct length to poll_out() The RPC code is not net_buf aware so it will not update the net_buf length when encoding data into it. We have to therefore do it ourselves. Change-Id: I7d7d3c09007a2a9bce822625607dbf7470a7ea0b Signed-off-by: Johan Hedberg --- drivers/nble/uart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/nble/uart.c b/drivers/nble/uart.c index 95b429b376d..9f08202d5df 100644 --- a/drivers/nble/uart.c +++ b/drivers/nble/uart.c @@ -107,7 +107,7 @@ void rpc_transmit_cb(uint8_t *p_buf, uint16_t length) poll_out(&hdr, sizeof(hdr)); /* Send data */ - poll_out(buf->data, buf->len); + poll_out(buf->data, length); net_buf_unref(buf); }