From 2c5932e4fd99cc3ae28415f69048a7056cbc4dbb Mon Sep 17 00:00:00 2001 From: Hrishikesh Dhayagude Date: Mon, 9 Dec 2019 17:05:36 +0530 Subject: [PATCH] examples/bluetooth/nimble: Correct the connection handle in update and enc_change event --- examples/bluetooth/nimble/bleprph/main/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/bluetooth/nimble/bleprph/main/main.c b/examples/bluetooth/nimble/bleprph/main/main.c index 58fc39a34..d43d4d8b9 100644 --- a/examples/bluetooth/nimble/bleprph/main/main.c +++ b/examples/bluetooth/nimble/bleprph/main/main.c @@ -181,7 +181,7 @@ bleprph_gap_event(struct ble_gap_event *event, void *arg) /* The central has updated the connection parameters. */ MODLOG_DFLT(INFO, "connection updated; status=%d ", event->conn_update.status); - rc = ble_gap_conn_find(event->connect.conn_handle, &desc); + rc = ble_gap_conn_find(event->conn_update.conn_handle, &desc); assert(rc == 0); bleprph_print_conn_desc(&desc); MODLOG_DFLT(INFO, "\n"); @@ -197,7 +197,7 @@ bleprph_gap_event(struct ble_gap_event *event, void *arg) /* Encryption has been enabled or disabled for this connection. */ MODLOG_DFLT(INFO, "encryption change event; status=%d ", event->enc_change.status); - rc = ble_gap_conn_find(event->connect.conn_handle, &desc); + rc = ble_gap_conn_find(event->enc_change.conn_handle, &desc); assert(rc == 0); bleprph_print_conn_desc(&desc); MODLOG_DFLT(INFO, "\n");