diff options
author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2014-10-27 17:32:37 -0700 |
---|---|---|
committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2014-10-27 17:32:37 -0700 |
commit | fe7b429866693debe0057d81f11e527f61dfd24b (patch) | |
tree | eec1665503a47e139a4d928b976c66cdd3e146f5 /testnet/TestEthernetTap.hpp | |
parent | 295f6a20e0e0c9e4d99472f1580963ffc424619c (diff) | |
download | infinitytier-fe7b429866693debe0057d81f11e527f61dfd24b.tar.gz infinitytier-fe7b429866693debe0057d81f11e527f61dfd24b.zip |
...
Diffstat (limited to 'testnet/TestEthernetTap.hpp')
-rw-r--r-- | testnet/TestEthernetTap.hpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/testnet/TestEthernetTap.hpp b/testnet/TestEthernetTap.hpp index b7f79aca..babd35ad 100644 --- a/testnet/TestEthernetTap.hpp +++ b/testnet/TestEthernetTap.hpp @@ -32,8 +32,6 @@ #include <stdlib.h> #include <string.h> -#include <stdexcept> -#include <queue> #include <string> #include "../node/Constants.hpp" @@ -42,7 +40,7 @@ #include "../node/SharedPtr.hpp" #include "../node/Thread.hpp" #include "../node/Mutex.hpp" -#include "../node/Condition.hpp" +#include "Condition.hpp" namespace ZeroTier { @@ -109,12 +107,11 @@ public: inline uint64_t nwid() const { return _nwid; } // Get things that have been put() and empty queue - inline void get(std::vector<TestFrame> &v,bool clearQueue = true) + inline void get(std::vector<TestFrame> &v) { Mutex::Lock _l(_gq_m); v = _gq; - if (clearQueue) - _gq.clear(); + _gq.clear(); } void threadMain() @@ -130,7 +127,7 @@ private: std::string _dev; volatile bool _enabled; - std::queue< TestFrame > _pq; + std::vector< TestFrame > _pq; Mutex _pq_m; Condition _pq_c; |