From 09f96d4ccefc1652036c3fe92c1d97009420ef76 Mon Sep 17 00:00:00 2001 From: Eric Harding Date: Thu, 5 Apr 2018 11:29:08 -0400 Subject: [PATCH] Backport mdp3main changes from edge --- src/lib/utils/SecureLogon.cpp | 8 +++++--- src/server/sparkd/md/platforms/mdp3_onixs/MDP3Main.cpp | 8 +++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/lib/utils/SecureLogon.cpp b/src/lib/utils/SecureLogon.cpp index 1dc5250e1..608ae95f5 100644 --- a/src/lib/utils/SecureLogon.cpp +++ b/src/lib/utils/SecureLogon.cpp @@ -14,13 +14,13 @@ #include #include -#include +#include // #include "catch/catch.hpp" #include using namespace CryptoPP; - using namespace boost; +using namespace boost; using std::string; namespace bts { @@ -65,7 +65,8 @@ std::tuple load_session_keys(const string& session) { } } } - bts_assert(false); + string error = "Failed to find secure logon key for session: " + session; + bts_assert_msg(false, error); } LogonData calculate_hmac( @@ -107,6 +108,7 @@ LogonData calculate_hmac( string secret_key, access_id; std::tie(access_id, secret_key) = load_session_keys(session_id); + // LOG(o2, info, "Loaded access_id {} and secret {} for session {}", access_id, secret_key, session_id); try { string decoded_key; diff --git a/src/server/sparkd/md/platforms/mdp3_onixs/MDP3Main.cpp b/src/server/sparkd/md/platforms/mdp3_onixs/MDP3Main.cpp index 10f3922c6..f2055449c 100644 --- a/src/server/sparkd/md/platforms/mdp3_onixs/MDP3Main.cpp +++ b/src/server/sparkd/md/platforms/mdp3_onixs/MDP3Main.cpp @@ -308,9 +308,7 @@ unique_ptr MDP3Main::prepare_handler(const string& channel_id) { try { auto handler = unique_ptr(new onixs::Handler(settings)); - if (options.has_feed_engine()) { - handler->bindFeedEngine(*_engines[options.feed_engine()]); - } + handler->bindFeedEngine(*_engines.at(options.feed_engine())); if (recovery) { handler->bindTcpRecovery(*recovery); _recovery.push_back(std::move(recovery)); @@ -327,8 +325,8 @@ unique_ptr MDP3Main::prepare_handler(const string& channel_id) { } } -// // -// // Create a listener for this channel and register callbacks +// +// Create a listener for this channel and register callbacks unique_ptr MDP3Main::prepare_listener(onixs::Handler& handler, const CMEChannel& channel) { // We need to get a handler to the producer channels so we can produce heartbeats vector producer_channels;