nimble/att: Use packed struct for receiving Read Multiple Response Use packed structure to map it to received mbuf instead of using dedicated parsing function. Modern compilers generate effective code in such case anyway.
Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/a36089c4 Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/a36089c4 Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/a36089c4 Branch: refs/heads/master Commit: a36089c42de642b1678ccede93d7606a6c6796e9 Parents: d7da6aa Author: Szymon Janc <szymon.j...@codecoup.pl> Authored: Fri Mar 24 15:50:05 2017 +0100 Committer: Szymon Janc <szymon.j...@codecoup.pl> Committed: Mon Apr 10 11:31:32 2017 +0200 ---------------------------------------------------------------------- net/nimble/host/src/ble_att_clt.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/a36089c4/net/nimble/host/src/ble_att_clt.c ---------------------------------------------------------------------- diff --git a/net/nimble/host/src/ble_att_clt.c b/net/nimble/host/src/ble_att_clt.c index 612d3c5..a8220f4 100644 --- a/net/nimble/host/src/ble_att_clt.c +++ b/net/nimble/host/src/ble_att_clt.c @@ -637,10 +637,10 @@ ble_att_clt_rx_read_mult(uint16_t conn_handle, struct os_mbuf **rxom) BLE_ATT_LOG_EMPTY_CMD(0, "read mult rsp", conn_handle); - /* Reponse consists of a one-byte opcode (already verified) and a variable - * length Attribute Value field. Strip the opcode from the response. + /* TODO move this to common part + * Strip L2CAP ATT header from the front of the mbuf. */ - os_mbuf_adj(*rxom, BLE_ATT_READ_MULT_RSP_BASE_SZ); + os_mbuf_adj(*rxom, 1); /* Pass the Attribute Value field to GATT. */ ble_gattc_rx_read_mult_rsp(conn_handle, 0, rxom);