diff options
author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2013-09-11 16:17:51 -0400 |
---|---|---|
committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2013-09-11 16:17:51 -0400 |
commit | 75471ee0e09f715a9c0961dd4b4787ddd258ce75 (patch) | |
tree | 1114c426a64163f16e01ee4e59edab6ca4153ce3 /node | |
parent | 5885c6186d4e192a8aeb205ff25a44a88fb431be (diff) | |
download | infinitytier-75471ee0e09f715a9c0961dd4b4787ddd258ce75.tar.gz infinitytier-75471ee0e09f715a9c0961dd4b4787ddd258ce75.zip |
Small method rename.
Diffstat (limited to 'node')
-rw-r--r-- | node/Network.cpp | 10 | ||||
-rw-r--r-- | node/Network.hpp | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/node/Network.cpp b/node/Network.cpp index fc9973e5..058cce9c 100644 --- a/node/Network.cpp +++ b/node/Network.cpp @@ -136,8 +136,8 @@ Network::~Network() delete _tap; if (_destroyOnDelete) { - std::string confPath(_r->homePath + ZT_PATH_SEPARATOR_S + "networks.d" + ZT_PATH_SEPARATOR_S + toString() + ".conf"); - std::string mcdbPath(_r->homePath + ZT_PATH_SEPARATOR_S + "networks.d" + ZT_PATH_SEPARATOR_S + toString() + ".mcerts"); + std::string confPath(_r->homePath + ZT_PATH_SEPARATOR_S + "networks.d" + ZT_PATH_SEPARATOR_S + idString() + ".conf"); + std::string mcdbPath(_r->homePath + ZT_PATH_SEPARATOR_S + "networks.d" + ZT_PATH_SEPARATOR_S + idString() + ".mcerts"); Utils::rm(confPath); Utils::rm(mcdbPath); } else { @@ -192,7 +192,7 @@ void Network::setConfiguration(const Network::Config &conf) for(std::set<unsigned int>::const_iterator t(wl.begin());t!=wl.end();++t) _etWhitelist[*t / 8] |= (unsigned char)(1 << (*t % 8)); - std::string confPath(_r->homePath + ZT_PATH_SEPARATOR_S + "networks.d" + ZT_PATH_SEPARATOR_S + toString() + ".conf"); + std::string confPath(_r->homePath + ZT_PATH_SEPARATOR_S + "networks.d" + ZT_PATH_SEPARATOR_S + idString() + ".conf"); if (!Utils::writeFile(confPath.c_str(),conf.toString())) { LOG("error: unable to write network configuration file at: %s",confPath.c_str()); } @@ -246,7 +246,7 @@ bool Network::isAllowed(const Address &peer) const void Network::clean() { - std::string mcdbPath(_r->homePath + ZT_PATH_SEPARATOR_S + "networks.d" + ZT_PATH_SEPARATOR_S + toString() + ".mcerts"); + std::string mcdbPath(_r->homePath + ZT_PATH_SEPARATOR_S + "networks.d" + ZT_PATH_SEPARATOR_S + idString() + ".mcerts"); Mutex::Lock _l(_lock); @@ -316,7 +316,7 @@ void Network::_CBhandleTapData(void *arg,const MAC &from,const MAC &to,unsigned void Network::_restoreState() { - std::string confPath(_r->homePath + ZT_PATH_SEPARATOR_S + "networks.d" + ZT_PATH_SEPARATOR_S + toString() + ".conf"); + std::string confPath(_r->homePath + ZT_PATH_SEPARATOR_S + "networks.d" + ZT_PATH_SEPARATOR_S + idString() + ".conf"); std::string confs; if (Utils::readFile(confPath.c_str(),confs)) { try { diff --git a/node/Network.hpp b/node/Network.hpp index 13c1338d..a269ec18 100644 --- a/node/Network.hpp +++ b/node/Network.hpp @@ -456,7 +456,7 @@ public: /** * @return Network ID in hexadecimal form */ - inline std::string toString() + inline std::string idString() { char buf[64]; Utils::snprintf(buf,sizeof(buf),"%.16llx",(unsigned long long)_id); |