BLE: Remove dependency of GenericSecurityManager towards gap.

pull/6188/head
Vincent Coubard 2018-02-19 17:46:41 +00:00
parent 28f2f46974
commit 4ce0ed9c0c
2 changed files with 5 additions and 5 deletions

View File

@ -21,7 +21,7 @@
#include "ble/BLETypes.h"
#include "ble/pal/SecurityDb.h"
#include "platform/Callback.h"
#include "ble/Gap.h"
#include "ble/pal/ConnectionEventMonitor.h"
#include "ble/generic/GenericGap.h"
#include "ble/pal/PalSecurityManager.h"
@ -237,10 +237,10 @@ public:
GenericSecurityManager(
pal::SecurityManager &palImpl,
pal::SecurityDb &dbImpl,
GenericGap &gapImpl
pal::ConnectionEventMonitor &connMonitorImpl
) : _pal(palImpl),
_db(dbImpl),
_gap(gapImpl),
_connection_monitor(connMonitorImpl),
_default_authentication(0),
_default_key_distribution(KeyDistribution::KEY_DISTRIBUTION_ALL),
_pairing_authorisation_required(false),
@ -433,7 +433,7 @@ private:
private:
pal::SecurityManager &_pal;
pal::SecurityDb &_db;
GenericGap &_gap;
pal::ConnectionEventMonitor &_connection_monitor;
AuthenticationMask _default_authentication;
KeyDistribution _default_key_distribution;

View File

@ -55,7 +55,7 @@ ble_error_t GenericSecurityManager::init(
init_signing();
}
_gap.set_connection_event_handler(this);
_connection_monitor.set_connection_event_handler(this);
_pal.generate_public_key();