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 <johan.hedberg@intel.com>
This commit is contained in:
Johan Hedberg 2016-01-25 19:07:09 -05:00 committed by Anas Nashif
commit 733f837aae

View file

@ -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);
}