Loading tools/rootcanal/model/controller/dual_mode_controller.cc +1 −7 Original line number Diff line number Diff line Loading @@ -18,7 +18,6 @@ #include <algorithm> #include <memory> #include <random> #include "crypto/crypto.h" #include "log.h" Loading Loading @@ -2246,17 +2245,12 @@ void DualModeController::LeEncrypt(CommandView command) { kNumCommandPackets, ErrorCode::SUCCESS, encrypted_data)); } static std::random_device rd{}; static std::mt19937_64 s_mt{rd()}; void DualModeController::LeRand(CommandView command) { auto command_view = bluetooth::hci::LeRandView::Create(command); ASSERT(command_view.IsValid()); uint64_t random_val = s_mt(); send_event_(bluetooth::hci::LeRandCompleteBuilder::Create( kNumCommandPackets, ErrorCode::SUCCESS, random_val)); kNumCommandPackets, ErrorCode::SUCCESS, random_generator_())); } void DualModeController::LeReadSupportedStates(CommandView command) { Loading tools/rootcanal/model/controller/dual_mode_controller.h +4 −1 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ #include <cstdint> #include <memory> #include <random> #include <string> #include <unordered_map> #include <vector> Loading Loading @@ -562,7 +563,6 @@ class DualModeController : public Device { void WriteConnectionAcceptTimeout(CommandView command); // Vendor-specific Commands void LeGetVendorCapabilities(CommandView command); void LeEnergyInfo(CommandView command); void LeMultiAdv(CommandView command); Loading Loading @@ -606,6 +606,9 @@ class DualModeController : public Device { // with RootCanal. bluetooth::hci::LoopbackMode loopback_mode_{LoopbackMode::NO_LOOPBACK}; // Random value generator, always seeded with 0 to be deterministic. std::mt19937_64 random_generator_{0}; // Flag set to true after the HCI Reset command has been received // the first time. bool controller_reset_{false}; Loading Loading
tools/rootcanal/model/controller/dual_mode_controller.cc +1 −7 Original line number Diff line number Diff line Loading @@ -18,7 +18,6 @@ #include <algorithm> #include <memory> #include <random> #include "crypto/crypto.h" #include "log.h" Loading Loading @@ -2246,17 +2245,12 @@ void DualModeController::LeEncrypt(CommandView command) { kNumCommandPackets, ErrorCode::SUCCESS, encrypted_data)); } static std::random_device rd{}; static std::mt19937_64 s_mt{rd()}; void DualModeController::LeRand(CommandView command) { auto command_view = bluetooth::hci::LeRandView::Create(command); ASSERT(command_view.IsValid()); uint64_t random_val = s_mt(); send_event_(bluetooth::hci::LeRandCompleteBuilder::Create( kNumCommandPackets, ErrorCode::SUCCESS, random_val)); kNumCommandPackets, ErrorCode::SUCCESS, random_generator_())); } void DualModeController::LeReadSupportedStates(CommandView command) { Loading
tools/rootcanal/model/controller/dual_mode_controller.h +4 −1 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ #include <cstdint> #include <memory> #include <random> #include <string> #include <unordered_map> #include <vector> Loading Loading @@ -562,7 +563,6 @@ class DualModeController : public Device { void WriteConnectionAcceptTimeout(CommandView command); // Vendor-specific Commands void LeGetVendorCapabilities(CommandView command); void LeEnergyInfo(CommandView command); void LeMultiAdv(CommandView command); Loading Loading @@ -606,6 +606,9 @@ class DualModeController : public Device { // with RootCanal. bluetooth::hci::LoopbackMode loopback_mode_{LoopbackMode::NO_LOOPBACK}; // Random value generator, always seeded with 0 to be deterministic. std::mt19937_64 random_generator_{0}; // Flag set to true after the HCI Reset command has been received // the first time. bool controller_reset_{false}; Loading