diff options
| author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2014-09-30 16:28:25 -0700 |
|---|---|---|
| committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2014-09-30 16:28:25 -0700 |
| commit | 2659427864aee89977a58440705f7069c0e6c639 (patch) | |
| tree | 21cd30ae78ed7b1df414f877d55a9243cfa342e8 /node/Node.cpp | |
| parent | 8607aa7c3c0a24c3161b605e5195bfd5a7ad1258 (diff) | |
| download | infinitytier-2659427864aee89977a58440705f7069c0e6c639.tar.gz infinitytier-2659427864aee89977a58440705f7069c0e6c639.zip | |
Multicaster needs to be global, not per-network, and a bunch of other stuff.
Diffstat (limited to 'node/Node.cpp')
| -rw-r--r-- | node/Node.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/node/Node.cpp b/node/Node.cpp index 58373643..0573392f 100644 --- a/node/Node.cpp +++ b/node/Node.cpp @@ -69,6 +69,7 @@ #include "NodeConfig.hpp" #include "Network.hpp" #include "MulticastGroup.hpp" +#include "Multicaster.hpp" #include "Mutex.hpp" #include "Service.hpp" #include "SoftwareUpdater.hpp" @@ -112,6 +113,7 @@ struct _NodeImpl delete renv.topology; renv.topology = (Topology *)0; // now we no longer need routing info delete renv.sm; renv.sm = (SocketManager *)0; // close all sockets delete renv.sw; renv.sw = (Switch *)0; // order matters less from here down + delete renv.mc; renv.mc = (Multicaster *)0; delete renv.antiRec; renv.antiRec = (AntiRecursion *)0; delete renv.http; renv.http = (HttpClient *)0; delete renv.prng; renv.prng = (CMWC4096 *)0; @@ -380,6 +382,7 @@ Node::ReasonForTermination Node::run() RR->http = new HttpClient(); RR->antiRec = new AntiRecursion(); + RR->mc = new Multicaster(); RR->sw = new Switch(_r); RR->sm = new SocketManager(impl->udpPort,impl->tcpPort,&_CBztTraffic,_r); RR->topology = new Topology(RR,Utils::fileExists((RR->homePath + ZT_PATH_SEPARATOR_S + "iddb.d").c_str())); @@ -602,8 +605,8 @@ Node::ReasonForTermination Node::run() // Do periodic tasks in submodules. if ((now - lastClean) >= ZT_DB_CLEAN_PERIOD) { lastClean = now; - RR->mc->clean(); RR->topology->clean(); + RR->mc->clean(RR,now); RR->nc->clean(); if (RR->updater) RR->updater->checkIfMaxIntervalExceeded(now); |
