diff options
| author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2014-10-01 12:41:48 -0700 |
|---|---|---|
| committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2014-10-01 12:41:48 -0700 |
| commit | ae082c3cb8a1ba7f8efb95ce690b012ffa7a79cd (patch) | |
| tree | 1b4eacab0989aa6423cc1e617393fe0586eb6938 /node/Node.cpp | |
| parent | ea6124dd2f48cafd8333d03705a8c8a9c201553d (diff) | |
| download | infinitytier-ae082c3cb8a1ba7f8efb95ce690b012ffa7a79cd.tar.gz infinitytier-ae082c3cb8a1ba7f8efb95ce690b012ffa7a79cd.zip | |
Yay... now everything compiles! Getting close to testing on this. Still have not added backward compatibility support for relaying of multicasts to 0.9.X clients yet but that will be easy. Will test with heterogenous 1.0.0 clients only first.
Diffstat (limited to 'node/Node.cpp')
| -rw-r--r-- | node/Node.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/node/Node.cpp b/node/Node.cpp index 0573392f..05a490b7 100644 --- a/node/Node.cpp +++ b/node/Node.cpp @@ -383,11 +383,11 @@ 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->sw = new Switch(RR); + RR->sm = new SocketManager(impl->udpPort,impl->tcpPort,&_CBztTraffic,RR); RR->topology = new Topology(RR,Utils::fileExists((RR->homePath + ZT_PATH_SEPARATOR_S + "iddb.d").c_str())); try { - RR->nc = new NodeConfig(_r); + RR->nc = new NodeConfig(RR); } catch (std::exception &exc) { return impl->terminateBecause(Node::NODE_UNRECOVERABLE_ERROR,"unable to initialize IPC socket: is ZeroTier One already running?"); } @@ -395,7 +395,7 @@ Node::ReasonForTermination Node::run() #ifdef ZT_AUTO_UPDATE if (ZT_DEFAULTS.updateLatestNfoURL.length()) { - RR->updater = new SoftwareUpdater(_r); + RR->updater = new SoftwareUpdater(RR); RR->updater->cleanOldUpdates(); // clean out updates.d on startup } else { LOG("WARNING: unable to enable software updates: latest .nfo URL from ZT_DEFAULTS is empty (does this platform actually support software updates?)"); @@ -443,7 +443,7 @@ Node::ReasonForTermination Node::run() std::string netconfServicePath(RR->homePath + ZT_PATH_SEPARATOR_S + "services.d" + ZT_PATH_SEPARATOR_S + "netconf.service"); if (Utils::fileExists(netconfServicePath.c_str())) { LOG("netconf.d/netconf.service appears to exist, starting..."); - RR->netconfService = new Service(RR,"netconf",netconfServicePath.c_str(),&_netconfServiceMessageHandler,_r); + RR->netconfService = new Service(RR,"netconf",netconfServicePath.c_str(),&_netconfServiceMessageHandler,RR); Dictionary initMessage; initMessage["type"] = "netconf-init"; initMessage["netconfId"] = RR->identity.toString(true); @@ -570,7 +570,7 @@ Node::ReasonForTermination Node::run() try { std::vector< SharedPtr<Network> > networks(RR->nc->networks()); for(std::vector< SharedPtr<Network> >::const_iterator nw(networks.begin());nw!=networks.end();++nw) - (*nw)->updateMulticastGroups()); + (*nw)->updateMulticastGroups(); } catch (std::exception &exc) { LOG("unexpected exception announcing multicast groups: %s",exc.what()); } catch ( ... ) { @@ -631,7 +631,7 @@ Node::ReasonForTermination Node::run() lastRootTopologyFetch = now; if (!impl->disableRootTopologyUpdates) { TRACE("fetching root topology from %s",ZT_DEFAULTS.rootTopologyUpdateURL.c_str()); - RR->http->GET(ZT_DEFAULTS.rootTopologyUpdateURL,HttpClient::NO_HEADERS,60,&_cbHandleGetRootTopology,_r); + RR->http->GET(ZT_DEFAULTS.rootTopologyUpdateURL,HttpClient::NO_HEADERS,60,&_cbHandleGetRootTopology,RR); } } @@ -715,7 +715,7 @@ bool Node::initialized() { _NodeImpl *impl = (_NodeImpl *)_impl; RuntimeEnvironment *RR = (RuntimeEnvironment *)&(impl->renv); - return ((_r)&&(RR->initialized)); + return ((RR)&&(RR->initialized)); } uint64_t Node::address() @@ -723,7 +723,7 @@ uint64_t Node::address() { _NodeImpl *impl = (_NodeImpl *)_impl; RuntimeEnvironment *RR = (RuntimeEnvironment *)&(impl->renv); - if ((!_r)||(!RR->initialized)) + if ((!RR)||(!RR->initialized)) return 0; return RR->identity.address().toInt(); } |
