Loading tools/rootcanal/model/controller/dual_mode_controller.cc +7 −1 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ #include <algorithm> #include <memory> #include <random> #include "crypto/crypto.h" #include "log.h" Loading Loading @@ -2245,12 +2246,17 @@ 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_generator_())); kNumCommandPackets, ErrorCode::SUCCESS, random_val)); } void DualModeController::LeReadSupportedStates(CommandView command) { Loading tools/rootcanal/model/controller/dual_mode_controller.h +1 −4 Original line number Diff line number Diff line Loading @@ -20,7 +20,6 @@ #include <cstdint> #include <memory> #include <random> #include <string> #include <unordered_map> #include <vector> Loading Loading @@ -563,6 +562,7 @@ 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,9 +606,6 @@ 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 +7 −1 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ #include <algorithm> #include <memory> #include <random> #include "crypto/crypto.h" #include "log.h" Loading Loading @@ -2245,12 +2246,17 @@ 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_generator_())); kNumCommandPackets, ErrorCode::SUCCESS, random_val)); } void DualModeController::LeReadSupportedStates(CommandView command) { Loading
tools/rootcanal/model/controller/dual_mode_controller.h +1 −4 Original line number Diff line number Diff line Loading @@ -20,7 +20,6 @@ #include <cstdint> #include <memory> #include <random> #include <string> #include <unordered_map> #include <vector> Loading Loading @@ -563,6 +562,7 @@ 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,9 +606,6 @@ 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