fix(nimble): Corrected link_estab event handling parameters

This commit is contained in:
Rahul Tank
2025-01-07 16:23:17 +05:30
parent 03a4e24394
commit fc3ecc2527
28 changed files with 173 additions and 173 deletions
+4 -4
View File
@@ -216,16 +216,16 @@ blecsc_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 */
blecsc_advertise();
conn_handle = 0;
}
else {
conn_handle = event->connect.conn_handle;
conn_handle = event->link_estab.conn_handle;
}
break;