This is an automated email from the ASF dual-hosted git repository.
janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git
The following commit(s) were added to refs/heads/master by this push:
new 87783b1 Fix big-endian serialization issues
87783b1 is described below
commit 87783b12ae8c153cdd2da81b7a0a5e0e54780f2a
Author: hbcam <unknown>
AuthorDate: Fri Jul 17 12:00:00 2020 +0200
Fix big-endian serialization issues
---
nimble/host/src/ble_att_svr.c | 2 +-
nimble/host/src/ble_hs_hci.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/nimble/host/src/ble_att_svr.c b/nimble/host/src/ble_att_svr.c
index 46a7168..be61e4b 100644
--- a/nimble/host/src/ble_att_svr.c
+++ b/nimble/host/src/ble_att_svr.c
@@ -1360,7 +1360,7 @@ done:
*att_err = 0;
/* Fill the response base. */
- rsp->batp_length = htole16(sizeof(*data) + prev_attr_len);
+ rsp->batp_length = sizeof(*data) + prev_attr_len;
}
*out_txom = txom;
diff --git a/nimble/host/src/ble_hs_hci.c b/nimble/host/src/ble_hs_hci.c
index a334a74..ac472a9 100644
--- a/nimble/host/src/ble_hs_hci.c
+++ b/nimble/host/src/ble_hs_hci.c
@@ -447,8 +447,8 @@ ble_hs_hci_acl_hdr_prepend(struct os_mbuf *om, uint16_t
handle,
struct hci_data_hdr hci_hdr;
struct os_mbuf *om2;
- hci_hdr.hdh_handle_pb_bc =
- ble_hs_hci_util_handle_pb_bc_join(handle, pb_flag, 0);
+ put_le16(&hci_hdr.hdh_handle_pb_bc,
+ ble_hs_hci_util_handle_pb_bc_join(handle, pb_flag, 0));
put_le16(&hci_hdr.hdh_len, OS_MBUF_PKTHDR(om)->omp_len);
om2 = os_mbuf_prepend(om, sizeof hci_hdr);