diff options
author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2014-03-18 12:21:22 -0700 |
---|---|---|
committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2014-03-18 12:21:22 -0700 |
commit | 91fef21973a3590ce37d1c2b126c4b8246d2fb1b (patch) | |
tree | cce96cbbe83b6bff2a09987ab385c843c0d647d6 /node | |
parent | dc0f3559be4825b61c3fcf51f3f870d23450264e (diff) | |
download | infinitytier-91fef21973a3590ce37d1c2b126c4b8246d2fb1b.tar.gz infinitytier-91fef21973a3590ce37d1c2b126c4b8246d2fb1b.zip |
More ripping out of old condition stuff.
Diffstat (limited to 'node')
-rw-r--r-- | node/Node.cpp | 10 | ||||
-rw-r--r-- | node/Switch.cpp | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/node/Node.cpp b/node/Node.cpp index d6bb323f..6d748798 100644 --- a/node/Node.cpp +++ b/node/Node.cpp @@ -56,7 +56,7 @@ #include "Node.hpp" #include "Topology.hpp" -#include "Demarc.hpp" +#include "SocketManager.hpp" #include "Packet.hpp" #include "Switch.hpp" #include "Utils.hpp" @@ -242,7 +242,7 @@ struct _NodeImpl delete renv.nc; delete renv.sysEnv; delete renv.topology; - delete renv.demarc; + delete renv.sm; delete renv.sw; delete renv.mc; delete renv.prng; @@ -634,7 +634,7 @@ Node::ReasonForTermination Node::run() try { unsigned long delay = std::min((unsigned long)ZT_MIN_SERVICE_LOOP_INTERVAL,_r->sw->doTimerTasks()); uint64_t start = Utils::now(); - _r->mainLoopWaitCondition.wait(delay); + _r->sm->poll(delay); lastDelayDelta = (long)(Utils::now() - start) - (long)delay; // used to detect sleep/wake } catch (std::exception &exc) { LOG("unexpected exception running Switch doTimerTasks: %s",exc.what()); @@ -663,14 +663,14 @@ void Node::terminate(ReasonForTermination reason,const char *reasonText) { ((_NodeImpl *)_impl)->reasonForTermination = reason; ((_NodeImpl *)_impl)->reasonForTerminationStr = ((reasonText) ? reasonText : ""); - ((_NodeImpl *)_impl)->renv.mainLoopWaitCondition.signal(); + ((_NodeImpl *)_impl)->renv.sw->whack(); } void Node::resync() throw() { ((_NodeImpl *)_impl)->resynchronize = true; - ((_NodeImpl *)_impl)->renv.mainLoopWaitCondition.signal(); + ((_NodeImpl *)_impl)->renv.sw->whack(); } class _VersionStringMaker diff --git a/node/Switch.cpp b/node/Switch.cpp index 329d592c..30160110 100644 --- a/node/Switch.cpp +++ b/node/Switch.cpp @@ -321,7 +321,7 @@ void Switch::contact(const SharedPtr<Peer> &peer,const InetAddress &atAddr) // Kick main loop out of wait so that it can pick up this // change to our scheduled timer tasks. - _r->mainLoopWaitCondition.signal(); + _r->sm->whack(); } unsigned long Switch::doTimerTasks() |