mirror of https://github.com/ARMmbed/mbed-os.git
BLE: Do not pass peer resolvable address in connection event handler
parent
c3bcd10cfd
commit
28766bd873
|
@ -385,8 +385,7 @@ private:
|
||||||
const BLEProtocol::AddressBytes_t peer_address,
|
const BLEProtocol::AddressBytes_t peer_address,
|
||||||
BLEProtocol::AddressType_t local_address_type,
|
BLEProtocol::AddressType_t local_address_type,
|
||||||
const BLEProtocol::AddressBytes_t local_address,
|
const BLEProtocol::AddressBytes_t local_address,
|
||||||
const Gap::ConnectionParams_t *connection_params,
|
const Gap::ConnectionParams_t *connection_params
|
||||||
const BLEProtocol::AddressBytes_t resolved_peer_address
|
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -58,8 +58,7 @@ public:
|
||||||
const BLEProtocol::AddressBytes_t peer_address,
|
const BLEProtocol::AddressBytes_t peer_address,
|
||||||
BLEProtocol::AddressType_t local_address_type,
|
BLEProtocol::AddressType_t local_address_type,
|
||||||
const BLEProtocol::AddressBytes_t local_address,
|
const BLEProtocol::AddressBytes_t local_address,
|
||||||
const ::Gap::ConnectionParams_t *connection_params,
|
const ::Gap::ConnectionParams_t *connection_params
|
||||||
const BLEProtocol::AddressBytes_t resolved_peer_address
|
|
||||||
) = 0;
|
) = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -968,8 +968,7 @@ void GenericSecurityManager::on_connected(
|
||||||
const BLEProtocol::AddressBytes_t peer_address,
|
const BLEProtocol::AddressBytes_t peer_address,
|
||||||
BLEProtocol::AddressType_t local_address_type,
|
BLEProtocol::AddressType_t local_address_type,
|
||||||
const BLEProtocol::AddressBytes_t local_address,
|
const BLEProtocol::AddressBytes_t local_address,
|
||||||
const Gap::ConnectionParams_t *connection_params,
|
const Gap::ConnectionParams_t *connection_params
|
||||||
const BLEProtocol::AddressBytes_t resolved_peer_address
|
|
||||||
) {
|
) {
|
||||||
MBED_ASSERT(_db);
|
MBED_ASSERT(_db);
|
||||||
ControlBlock_t *cb = acquire_control_block(connection);
|
ControlBlock_t *cb = acquire_control_block(connection);
|
||||||
|
@ -981,11 +980,6 @@ void GenericSecurityManager::on_connected(
|
||||||
cb->local_address = local_address;
|
cb->local_address = local_address;
|
||||||
cb->is_master = (role == Gap::CENTRAL);
|
cb->is_master = (role == Gap::CENTRAL);
|
||||||
|
|
||||||
// normalize the address
|
|
||||||
if (resolved_peer_address && resolved_peer_address != ble::address_t()) {
|
|
||||||
peer_address = resolved_peer_address;
|
|
||||||
}
|
|
||||||
|
|
||||||
// get the associated db handle and the distribution flags if any
|
// get the associated db handle and the distribution flags if any
|
||||||
cb->db_entry = _db->open_entry(peer_address_type, peer_address);
|
cb->db_entry = _db->open_entry(peer_address_type, peer_address);
|
||||||
|
|
||||||
|
|
|
@ -1393,8 +1393,7 @@ void nRF5xGap::on_connection(Gap::Handle_t handle, const ble_gap_evt_connected_t
|
||||||
peer_address,
|
peer_address,
|
||||||
own_addr_type,
|
own_addr_type,
|
||||||
own_address.data(),
|
own_address.data(),
|
||||||
reinterpret_cast<const ConnectionParams_t *>(&(evt.conn_params)),
|
reinterpret_cast<const ConnectionParams_t *>(&(evt.conn_params))
|
||||||
peer_resolvable_address
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue