mirror of
https://github.com/espressif/esp-nimble.git
synced 2026-10-05 06:17:23 +00:00
feat/nimble: Add support to allow connection during scanning
This commit is contained in:
@@ -5729,10 +5729,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;
|
||||
@@ -5906,10 +5908,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