You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by we...@apache.org on 2016/08/11 21:27:42 UTC

[42/50] [abbrv] incubator-mynewt-core git commit: BLE Host - Don't reject max-size adv field.

BLE Host - Don't reject max-size adv field.

The host would reject an advertising report if it contains a 31-byte
field (maximum size allowed).  It was incorrectly limiting fields to 30
bytes.


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/bec12a61
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/bec12a61
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/bec12a61

Branch: refs/heads/phyrx_no_mbuf
Commit: bec12a6192b0297b84b3bbf832fb2f49c032f0db
Parents: b607ac0
Author: Christopher Collins <cc...@apache.org>
Authored: Tue Aug 9 16:57:35 2016 -0700
Committer: William San Filippo <wi...@runtime.io>
Committed: Thu Aug 11 14:26:26 2016 -0700

----------------------------------------------------------------------
 net/nimble/host/src/ble_hs_adv.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/bec12a61/net/nimble/host/src/ble_hs_adv.c
----------------------------------------------------------------------
diff --git a/net/nimble/host/src/ble_hs_adv.c b/net/nimble/host/src/ble_hs_adv.c
index da0d5c1..305c672 100644
--- a/net/nimble/host/src/ble_hs_adv.c
+++ b/net/nimble/host/src/ble_hs_adv.c
@@ -23,7 +23,8 @@
 #include "host/ble_hs_adv.h"
 #include "ble_hs_priv.h"
 
-#define BLE_HS_ADV_MAX_FIELD_SZ     (BLE_HCI_MAX_ADV_DATA_LEN - 3)
+/** Max field paylaod size (account for 2-byte header). */
+#define BLE_HS_ADV_MAX_FIELD_SZ     (BLE_HCI_MAX_ADV_DATA_LEN - 2)
 
 static uint16_t ble_hs_adv_uuids16[BLE_HS_ADV_MAX_FIELD_SZ / 2];
 static uint32_t ble_hs_adv_uuids32[BLE_HS_ADV_MAX_FIELD_SZ / 4];