diff options
Diffstat (limited to 'node/Network.hpp')
-rw-r--r-- | node/Network.hpp | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/node/Network.hpp b/node/Network.hpp index 930d1538..8938ff1d 100644 --- a/node/Network.hpp +++ b/node/Network.hpp @@ -40,7 +40,6 @@ #include "Constants.hpp" #include "NonCopyable.hpp" -#include "Utils.hpp" #include "Address.hpp" #include "Mutex.hpp" #include "SharedPtr.hpp" @@ -230,18 +229,7 @@ public: * @param bytes Size of packet * @return True if packet is within budget */ - inline bool updateAndCheckMulticastBalance(const MulticastGroup &mg,unsigned int bytes) - { - Mutex::Lock _l(_lock); - if (!_config) - return false; - std::map< MulticastGroup,BandwidthAccount >::iterator bal(_multicastRateAccounts.find(mg)); - if (bal == _multicastRateAccounts.end()) { - NetworkConfig::MulticastRate r(_config->multicastRate(mg)); - bal = _multicastRateAccounts.insert(std::pair< MulticastGroup,BandwidthAccount >(mg,BandwidthAccount(r.preload,r.maxBalance,r.accrual))).first; - } - return bal->second.deduct(bytes); - } + bool updateAndCheckMulticastBalance(const MulticastGroup &mg,unsigned int bytes); /** * Get current network config or throw exception |