fix(nimble): Corrected link_estab event handling parameters

This commit is contained in:
Rahul Tank
2024-12-19 16:00:46 +05:30
parent f098b8f1f0
commit 21cebc7df9
27 changed files with 157 additions and 157 deletions
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2017-2023 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2017-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@@ -233,10 +233,10 @@ ble_htp_prph_gap_event(struct ble_gap_event *event, void *arg)
case BLE_GAP_EVENT_LINK_ESTAB:
/* A new connection was established or a connection attempt failed */
MODLOG_DFLT(INFO, "connection %s; status=%d\n",
event->connect.status == 0 ? "established" : "failed",
event->connect.status);
event->link_estab.status == 0 ? "established" : "failed",
event->link_estab.status);
if (event->connect.status != 0) {
if (event->link_estab.status != 0) {
/* Connection failed; resume advertising */
#if CONFIG_EXAMPLE_EXTENDED_ADV
ext_ble_htp_prph_advertise();
@@ -245,7 +245,7 @@ ble_htp_prph_gap_event(struct ble_gap_event *event, void *arg)
#endif
}
conn_handle = event->connect.conn_handle;
conn_handle = event->link_estab.conn_handle;
break;
case BLE_GAP_EVENT_DISCONNECT: