mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #11718 from desmond-blue/fix-ex-sm-fail-nrf52840
Handle legacy process event first on connection completepull/11756/head
commit
bc2162ab19
|
|
@ -1887,6 +1887,19 @@ void GenericGap<PalGapImpl, PalSecurityManager, ConnectionEventMonitorEventHandl
|
||||||
address = _pal_gap.get_random_address();
|
address = _pal_gap.get_random_address();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// legacy process event
|
||||||
|
processConnectionEvent(
|
||||||
|
e.connection_handle,
|
||||||
|
e.role.value() == e.role.CENTRAL ? LegacyGap::CENTRAL : LegacyGap::PERIPHERAL,
|
||||||
|
e.peer_address_type,
|
||||||
|
e.peer_address.data(),
|
||||||
|
_address_type,
|
||||||
|
address.data(),
|
||||||
|
&connection_params,
|
||||||
|
e.local_resolvable_private_address.data(),
|
||||||
|
e.peer_resolvable_private_address.data()
|
||||||
|
);
|
||||||
|
|
||||||
// new process event
|
// new process event
|
||||||
if (_eventHandler) {
|
if (_eventHandler) {
|
||||||
_eventHandler->onConnectionComplete(
|
_eventHandler->onConnectionComplete(
|
||||||
|
|
@ -1906,19 +1919,6 @@ void GenericGap<PalGapImpl, PalSecurityManager, ConnectionEventMonitorEventHandl
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// legacy process event
|
|
||||||
processConnectionEvent(
|
|
||||||
e.connection_handle,
|
|
||||||
e.role.value() == e.role.CENTRAL ? LegacyGap::CENTRAL : LegacyGap::PERIPHERAL,
|
|
||||||
e.peer_address_type,
|
|
||||||
e.peer_address.data(),
|
|
||||||
_address_type,
|
|
||||||
address.data(),
|
|
||||||
&connection_params,
|
|
||||||
e.local_resolvable_private_address.data(),
|
|
||||||
e.peer_resolvable_private_address.data()
|
|
||||||
);
|
|
||||||
|
|
||||||
#if BLE_FEATURE_SECURITY
|
#if BLE_FEATURE_SECURITY
|
||||||
// Now starts pairing or authentication procedures if required
|
// Now starts pairing or authentication procedures if required
|
||||||
if (needs_pairing) {
|
if (needs_pairing) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue