mirror of
https://github.com/espressif/esp-nimble.git
synced 2026-06-05 21:04:49 +00:00
feat/nimble: Add support to allow connection during scanning
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user