diff options
author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2015-07-24 14:50:44 -0700 |
---|---|---|
committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2015-07-24 14:50:44 -0700 |
commit | 7a15d8a7e3fb4934200887666afdf17afb1178e5 (patch) | |
tree | 446bde0730e04d5f58d2e6b329cac58146053b03 | |
parent | dba91eaa096d85992bf37a6c19dbead8104d9088 (diff) | |
download | infinitytier-7a15d8a7e3fb4934200887666afdf17afb1178e5.tar.gz infinitytier-7a15d8a7e3fb4934200887666afdf17afb1178e5.zip |
Fix leaving of networks to actually call Network::destroy().
-rw-r--r-- | node/Node.cpp | 1 | ||||
-rw-r--r-- | osdep/OSUtils.hpp | 5 |
2 files changed, 3 insertions, 3 deletions
diff --git a/node/Node.cpp b/node/Node.cpp index ebe0527e..d40ceab9 100644 --- a/node/Node.cpp +++ b/node/Node.cpp @@ -316,6 +316,7 @@ ZT1_ResultCode Node::leave(uint64_t nwid) for(std::vector< std::pair< uint64_t,SharedPtr<Network> > >::const_iterator n(_networks.begin());n!=_networks.end();++n) { if (n->first != nwid) newn.push_back(*n); + else n->second->destroy(); } _networks.swap(newn); return ZT1_RESULT_OK; diff --git a/osdep/OSUtils.hpp b/osdep/OSUtils.hpp index bfe9b68a..5de35eba 100644 --- a/osdep/OSUtils.hpp +++ b/osdep/OSUtils.hpp @@ -121,10 +121,10 @@ public: /** * Set modes on a file to something secure - * + * * This locks a file so that only the owner can access it. What it actually * does varies by platform. - * + * * @param path Path to lock * @param isDir True if this is a directory */ @@ -252,4 +252,3 @@ private: } // namespace ZeroTier #endif - |