diff options
| author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2014-10-23 16:46:09 -0700 |
|---|---|---|
| committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2014-10-23 16:46:09 -0700 |
| commit | 4fbb098daa349a663015426d1210f1b59d0478c4 (patch) | |
| tree | b2f5ca2c32c24bab5ad428d2c2323a1a75bb9b52 /testnet/SimNetSocketManager.hpp | |
| parent | 0a195e7bc0e23a5a7978a75befe8843d6e69aecd (diff) | |
| download | infinitytier-4fbb098daa349a663015426d1210f1b59d0478c4.tar.gz infinitytier-4fbb098daa349a663015426d1210f1b59d0478c4.zip | |
Testnet work... getting there!
Diffstat (limited to 'testnet/SimNetSocketManager.hpp')
| -rw-r--r-- | testnet/SimNetSocketManager.hpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/testnet/SimNetSocketManager.hpp b/testnet/SimNetSocketManager.hpp index 031cbd0c..69f49556 100644 --- a/testnet/SimNetSocketManager.hpp +++ b/testnet/SimNetSocketManager.hpp @@ -32,7 +32,7 @@ #include <utility> #include <queue> -#include "Constants.hpp" +#include "../node/Constants.hpp" #include "../node/SocketManager.hpp" #include "../node/Mutex.hpp" #include "../node/Condition.hpp" @@ -76,7 +76,10 @@ public: inline TransferStats stats(const InetAddress &peer) const { Mutex::Lock _l(_stats_m); - return _stats[peer]; + std::map< InetAddress,TransferStats >::const_iterator s(_stats.find(peer)); + if (s == _stats.end()) + return TransferStats(); + return s->second; } /** |
