This is an automated email from the ASF dual-hosted git repository.

naraj 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 9e981f0  mesh: Fix initializing connection handle for PB GATT
9e981f0 is described below

commit 9e981f09912d073a1f19f5ca6b8ae1fe642d4928
Author: MichaƂ Narajowski <michal.narajow...@codecoup.pl>
AuthorDate: Thu Jan 10 14:20:50 2019 +0100

    mesh: Fix initializing connection handle for PB GATT
    
    Commit bf1ff83361edd5494637cac69b61a6bb228f9870 introduced a regression
    due to not initialized conn handle. Provisioning code would use
    GATT bearer even though there was no active connection.
---
 nimble/host/mesh/src/prov.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/nimble/host/mesh/src/prov.c b/nimble/host/mesh/src/prov.c
index 1c8c2ae..9124613 100644
--- a/nimble/host/mesh/src/prov.c
+++ b/nimble/host/mesh/src/prov.c
@@ -1599,6 +1599,10 @@ int bt_mesh_prov_init(const struct bt_mesh_prov 
*prov_info)
        rx_buf = NET_BUF_SIMPLE(65);
 #endif
 
+#if (MYNEWT_VAL(BLE_MESH_PB_GATT))
+       link.conn_handle = BLE_HS_CONN_HANDLE_NONE;
+#endif
+
        if (!prov_info) {
                BT_ERR("No provisioning context provided");
                return -EINVAL;

Reply via email to