fix(nimble): Keep only BLE_GAP_EVENT_CONNECT gap event

This commit is contained in:
Rahul Tank
2025-03-27 10:01:17 +05:30
parent daf8117cb9
commit 20f902c953
30 changed files with 191 additions and 191 deletions
@@ -230,13 +230,13 @@ static int
ble_htp_prph_gap_event(struct ble_gap_event *event, void *arg)
{
switch (event->type) {
case BLE_GAP_EVENT_LINK_ESTAB:
case BLE_GAP_EVENT_CONNECT:
/* A new connection was established or a connection attempt failed */
MODLOG_DFLT(INFO, "connection %s; status=%d\n",
event->link_estab.status == 0 ? "established" : "failed",
event->link_estab.status);
event->connect.status == 0 ? "established" : "failed",
event->connect.status);
if (event->link_estab.status != 0) {
if (event->connect.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->link_estab.conn_handle;
conn_handle = event->connect.conn_handle;
break;
case BLE_GAP_EVENT_DISCONNECT: