From ba9aa6b641933bb03b3dc3bf02f6a5167ac4889a Mon Sep 17 00:00:00 2001 From: Vincent Coubard Date: Wed, 27 Feb 2019 22:15:06 +0000 Subject: [PATCH] Fix rebase mistakes. --- features/FEATURE_BLE/ble/generic/GenericGap.h | 2 +- .../FEATURE_BLE/ble/pal/PalSecurityManager.h | 22 ++++++++++++++----- features/FEATURE_BLE/source/LegacyGap.tpp | 3 +-- features/FEATURE_BLE/source/gap/Gap.tpp | 5 +---- 4 files changed, 19 insertions(+), 13 deletions(-) diff --git a/features/FEATURE_BLE/ble/generic/GenericGap.h b/features/FEATURE_BLE/ble/generic/GenericGap.h index 59f4c0144b..d93296f252 100644 --- a/features/FEATURE_BLE/ble/generic/GenericGap.h +++ b/features/FEATURE_BLE/ble/generic/GenericGap.h @@ -131,7 +131,7 @@ public: , pal::GenericAccessService &generic_access_service #endif #if BLE_FEATURE_SECURITY - PalSecurityManager &pal_sm + , PalSecurityManager &pal_sm #endif ); diff --git a/features/FEATURE_BLE/ble/pal/PalSecurityManager.h b/features/FEATURE_BLE/ble/pal/PalSecurityManager.h index 1ea497efdc..e0fa224df5 100644 --- a/features/FEATURE_BLE/ble/pal/PalSecurityManager.h +++ b/features/FEATURE_BLE/ble/pal/PalSecurityManager.h @@ -527,10 +527,12 @@ public: * @param[in] connection connection handle * @param[in] irk identity resolution key */ - virtual void on_keys_distributed_irk( + void on_keys_distributed_irk( connection_handle_t connection, const irk_t &irk - ) = 0; + ) { + impl()->on_keys_distributed_irk_(connection, irk); + } #endif // BLE_FEATURE_PRIVACY /** @@ -540,11 +542,17 @@ public: * @param[in] peer_identity_address_type public or private address indication * @param[in] peer_identity_address peer address */ - virtual void on_keys_distributed_bdaddr( + void on_keys_distributed_bdaddr( connection_handle_t connection, advertising_peer_address_type_t peer_identity_address_type, const address_t &peer_identity_address - ) = 0; + ) { + impl()->on_keys_distributed_bdaddr_( + connection, + peer_identity_address_type, + peer_identity_address + ); + } #if BLE_FEATURE_SIGNING /** @@ -553,10 +561,12 @@ public: * @param[in] connection connection handle * @param[in] csrk signing key */ - virtual void on_keys_distributed_csrk( + void on_keys_distributed_csrk( connection_handle_t connection, const csrk_t &csrk - ) = 0; + ) { + impl()->on_keys_distributed_csrk(connection, csrk); + } #endif // BLE_FEATURE_SIGNING /** diff --git a/features/FEATURE_BLE/source/LegacyGap.tpp b/features/FEATURE_BLE/source/LegacyGap.tpp index c3a1f5fcea..12d13f1cc8 100644 --- a/features/FEATURE_BLE/source/LegacyGap.tpp +++ b/features/FEATURE_BLE/source/LegacyGap.tpp @@ -600,7 +600,6 @@ void LegacyGap::onDisconnection(DisconnectionEventCallback_t callback) { disconnectionCallChain.add(callback); } -#endif // BLE_FEATURE_CONNECTION template typename LegacyGap::DisconnectionEventCallbackChain_t& LegacyGap::onDisconnection() @@ -1056,7 +1055,7 @@ ble_error_t LegacyGap::reset_(void) #if BLE_ROLE_OBSERVER onAdvertisementReport = NULL; #endif - _eventHandler = NULL; + this->_eventHandler = NULL; return BLE_ERROR_NONE; } diff --git a/features/FEATURE_BLE/source/gap/Gap.tpp b/features/FEATURE_BLE/source/gap/Gap.tpp index abd56a5f72..753dc61591 100644 --- a/features/FEATURE_BLE/source/gap/Gap.tpp +++ b/features/FEATURE_BLE/source/gap/Gap.tpp @@ -25,6 +25,7 @@ bool Gap::isFeatureSupported(controller_supported_features_t feature) return impl()->isFeatureSupported_(feature); } +#if BLE_ROLE_BROADCASTER template uint8_t Gap::getMaxAdvertisingSetNumber() { @@ -479,7 +480,6 @@ bool Gap::isFeatureSupported_(controller_supported_features_t feature) return false; } -#if BLE_ROLE_BROADCASTER template uint8_t Gap::getMaxAdvertisingSetNumber_() { @@ -694,7 +694,6 @@ uint8_t Gap::getMaxPeriodicAdvertiserListSize_() return 0; } -#if BLE_ROLE_CENTRAL template ble_error_t Gap::connect_( peer_address_type_t peerAddressType, @@ -710,9 +709,7 @@ ble_error_t Gap::cancelConnect_() { return BLE_ERROR_NOT_IMPLEMENTED; } -#endif // BLE_ROLE_CENTRAL -#if BLE_FEATURE_CONNECTABLE template ble_error_t Gap::updateConnectionParameters_( connection_handle_t connectionHandle,