feat/nimble: Add support to allow connection during scanning

This commit is contained in:
Rahul Tank
2024-08-01 13:46:34 +05:30
parent d47cb44f24
commit 50c2641a04
+4
View File
@@ -6110,10 +6110,12 @@ ble_gap_ext_connect(uint8_t own_addr_type, const ble_addr_t *peer_addr,
goto done;
}
#if !MYNEWT_VAL(BLE_HOST_ALLOW_CONNECT_WITH_SCAN)
if (ble_gap_disc_active()) {
rc = BLE_HS_EBUSY;
goto done;
}
#endif
if (!ble_hs_is_enabled()) {
rc = BLE_HS_EDISABLED;
@@ -6287,10 +6289,12 @@ ble_gap_connect(uint8_t own_addr_type, const ble_addr_t *peer_addr,
goto done;
}
#if !MYNEWT_VAL(BLE_HOST_ALLOW_CONNECT_WITH_SCAN)
if (ble_gap_disc_active()) {
rc = BLE_HS_EBUSY;
goto done;
}
#endif
if (!ble_hs_is_enabled()) {
rc = BLE_HS_EDISABLED;