You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by ja...@apache.org on 2022/08/31 15:22:09 UTC

[mynewt-nimble] branch master updated: apps/peripheral: Fix not saving conn_handle after connection

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 3de15c96 apps/peripheral: Fix not saving conn_handle after connection
3de15c96 is described below

commit 3de15c9615a9587ee1346d9a6cb57ad65a08ea22
Author: Michal Gorecki <mi...@codecoup.pl>
AuthorDate: Wed Aug 31 15:25:26 2022 +0200

    apps/peripheral: Fix not saving conn_handle after connection
    
    Even though conn_handle is defined and later used in
    connection params update request event callback, it was
    never initialized with a proper value.
---
 apps/peripheral/src/main.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/apps/peripheral/src/main.c b/apps/peripheral/src/main.c
index f22579a7..28e8afb1 100755
--- a/apps/peripheral/src/main.c
+++ b/apps/peripheral/src/main.c
@@ -50,6 +50,7 @@ adv_event(struct ble_gap_event *event, void *arg)
         MODLOG_DFLT(INFO, "connection %s; status=%d\n",
                     event->connect.status == 0 ? "established" : "failed",
                     event->connect.status);
+        conn_handle = event->connect.conn_handle;
         break;
     case BLE_GAP_EVENT_CONN_UPDATE_REQ:
         /* connected device requests update of connection parameters,