diff options
author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2013-09-19 14:36:37 -0400 |
---|---|---|
committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2013-09-19 14:36:37 -0400 |
commit | aac40562d39c44295cb2fa6398162f7c91d09289 (patch) | |
tree | 6d57e8b2af288361bb5104a2095e530c02512344 /node | |
parent | 903b5b42180cfd5dc337b1e96f355e71a07ec001 (diff) | |
download | infinitytier-aac40562d39c44295cb2fa6398162f7c91d09289.tar.gz infinitytier-aac40562d39c44295cb2fa6398162f7c91d09289.zip |
Add temporary code to remap old Earth network ID to new one.
Diffstat (limited to 'node')
-rw-r--r-- | node/NodeConfig.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/node/NodeConfig.cpp b/node/NodeConfig.cpp index 885e9177..4462d0e2 100644 --- a/node/NodeConfig.cpp +++ b/node/NodeConfig.cpp @@ -80,6 +80,15 @@ NodeConfig::NodeConfig(const RuntimeEnvironment *renv,const char *authToken,unsi std::string::size_type dot = d->first.rfind(".conf"); if (dot != std::string::npos) { uint64_t nwid = strtoull(d->first.substr(0,dot).c_str(),(char **)0,16); + + // TODO: remove legacy code -- this changes the network + // ID for Earth if it's subscribed. Also deletes old + // config file. New one will be created. + if (nwid == 0x6c92786fee000001ULL) { + nwid = 0xbc8f9a8ee3000001ULL; + Utils::rm(networksDotD + ZT_PATH_SEPARATOR_S + d->first); + } + if (nwid > 0) nwids.insert(nwid); } |