You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by an...@apache.org on 2017/04/10 11:47:22 UTC

[30/50] incubator-mynewt-core git commit: nimble/att: Use packed struct for receiving Read Blob Response

nimble/att: Use packed struct for receiving Read Blob 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/ac38eb72
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/ac38eb72
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/ac38eb72

Branch: refs/heads/master
Commit: ac38eb72d6525c1b21b95ec8af5e0c3976d2746a
Parents: 9c897e5
Author: Szymon Janc <sz...@codecoup.pl>
Authored: Fri Mar 24 15:50:04 2017 +0100
Committer: Szymon Janc <sz...@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/ac38eb72/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 b445f2d..612d3c5 100644
--- a/net/nimble/host/src/ble_att_clt.c
+++ b/net/nimble/host/src/ble_att_clt.c
@@ -583,10 +583,10 @@ ble_att_clt_rx_read_blob(uint16_t conn_handle, struct os_mbuf **rxom)
 
     BLE_ATT_LOG_EMPTY_CMD(0, "read blob 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_BLOB_RSP_BASE_SZ);
+    os_mbuf_adj(*rxom, 1);
 
     /* Pass the Attribute Value field to GATT. */
     ble_gattc_rx_read_blob_rsp(conn_handle, 0, rxom);