From 2d6a4e5974430ea01cf424aab8b372ebc872b25f Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Thu, 13 Oct 2016 13:52:45 -0700 Subject: cleanup --- controller/EmbeddedNetworkController.cpp | 22 ---------------------- controller/EmbeddedNetworkController.hpp | 12 ------------ 2 files changed, 34 deletions(-) (limited to 'controller') diff --git a/controller/EmbeddedNetworkController.cpp b/controller/EmbeddedNetworkController.cpp index 7559cf83..2c43d4b5 100644 --- a/controller/EmbeddedNetworkController.cpp +++ b/controller/EmbeddedNetworkController.cpp @@ -517,19 +517,6 @@ void EmbeddedNetworkController::threadMain() lastUpdatedNetworkMemberCache = OSUtils::now(); } - { // Every 25ms we push up to 50 network refreshes, which amounts to a max of about 300-500kb/sec - unsigned int count = 0; - Mutex::Lock _l(_refreshQueue_m); - while (_refreshQueue.size() > 0) { - _Refresh &r = _refreshQueue.front(); - //if (_node) - // _node->pushNetworkRefresh(r.dest,r.nwid,r.blacklistAddresses,r.blacklistThresholds,r.numBlacklistEntries); - _refreshQueue.pop_front(); - if (++count >= 50) - break; - } - } - Thread::sleep(25); } } @@ -1230,15 +1217,6 @@ unsigned int EmbeddedNetworkController::handleControlPlaneHttpPOST( _networkMemberCache[nwid][Address(address)] = member; } - { - Mutex::Lock _l(_refreshQueue_m); - _refreshQueue.push_back(_Refresh()); - _Refresh &r = _refreshQueue.back(); - r.dest = Address(address); - r.nwid = nwid; - r.numBlacklistEntries = 0; - } - // Add non-persisted fields member["clock"] = now; diff --git a/controller/EmbeddedNetworkController.hpp b/controller/EmbeddedNetworkController.hpp index 1e0fa576..99e1836d 100644 --- a/controller/EmbeddedNetworkController.hpp +++ b/controller/EmbeddedNetworkController.hpp @@ -204,18 +204,6 @@ private: std::map< std::pair,uint64_t > _lastRequestTime; Mutex _lastRequestTime_m; - // Queue of network member refreshes to be pushed - struct _Refresh - { - Address dest; - uint64_t nwid; - uint64_t blacklistAddresses[64]; - uint64_t blacklistThresholds[64]; - unsigned int numBlacklistEntries; - }; - std::list< _Refresh > _refreshQueue; - Mutex _refreshQueue_m; - Thread _daemon; volatile bool _daemonRun; }; -- cgit v1.2.3