Advertisement
Guest User

Untitled

a guest
Apr 6th, 2018
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.16 KB | None | 0 0
  1. From ecdb92d8cd26d544102b5c3e66b1262d236b08d9 Mon Sep 17 00:00:00 2001
  2. From: =?UTF-8?q?Micha=C5=82=20Narajowski?= <michal.narajowski@codecoup.pl>
  3. Date: Fri, 6 Apr 2018 14:03:40 +0200
  4. Subject: [PATCH] mesh: Fix using extended advertising
  5.  
  6. ---
  7.  nimble/host/mesh/src/glue.c | 4 +++-
  8.  1 file changed, 3 insertions(+), 1 deletion(-)
  9.  
  10. diff --git a/nimble/host/mesh/src/glue.c b/nimble/host/mesh/src/glue.c
  11. index 4ddb486c..20273108 100644
  12. --- a/nimble/host/mesh/src/glue.c
  13. +++ b/nimble/host/mesh/src/glue.c
  14. @@ -32,8 +32,8 @@
  15.  #if MYNEWT_VAL(BLE_MULTI_ADV_INSTANCES) < 1
  16.  #error "Mesh needs at least BLE_MULTI_ADV_INSTANCES set to 1"
  17.  #endif
  18. -#define BT_MESH_ADV_PROXY_INST     (MYNEWT_VAL(BLE_MULTI_ADV_INSTANCES) - 1)
  19.  #endif /* BLE_MESH_PROXY */
  20. +#define BT_MESH_ADV_PROXY_INST     (MYNEWT_VAL(BLE_MULTI_ADV_INSTANCES) - 1)
  21.  #endif /* BLE_EXT_ADV */
  22.  
  23.  extern u8_t g_mesh_addr_type;
  24. @@ -477,6 +477,8 @@ set_ad(const struct bt_data *ad, size_t ad_len, u8_t *buf, u8_t *buf_len)
  25.  {
  26.      int i;
  27.  
  28. +    *buf_len = 0;
  29. +
  30.      for (i = 0; i < ad_len; i++) {
  31.          buf[(*buf_len)++] = ad[i].data_len + 1;
  32.          buf[(*buf_len)++] = ad[i].type;
  33. --
  34. 2.14.1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement