diff options
author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2017-01-27 15:27:26 -0800 |
---|---|---|
committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2017-01-27 15:27:26 -0800 |
commit | 9f7919f71f6b4326e73759923d2cf747affc0244 (patch) | |
tree | 934294697a07df005e3f0df56a085f3eeb292b38 /service | |
parent | 0b3b994241161c996c8432a2fb25e47b0f84c359 (diff) | |
download | infinitytier-9f7919f71f6b4326e73759923d2cf747affc0244.tar.gz infinitytier-9f7919f71f6b4326e73759923d2cf747affc0244.zip |
Add comments to join ("orbit") moons.
Diffstat (limited to 'service')
-rw-r--r-- | service/OneService.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/service/OneService.cpp b/service/OneService.cpp index f6174d42..d2ebe6b7 100644 --- a/service/OneService.cpp +++ b/service/OneService.cpp @@ -702,6 +702,14 @@ public: _node->join(Utils::hexStrToU64(f->substr(0,dot).c_str()),(void *)0); } } + { // Load existing moons + std::vector<std::string> moonsDotD(OSUtils::listDirectory((_homePath + ZT_PATH_SEPARATOR_S "moons.d").c_str())); + for(std::vector<std::string>::iterator f(moonsDotD.begin());f!=moonsDotD.end();++f) { + std::size_t dot = f->find_last_of('.'); + if ((dot == 16)&&(f->substr(16) == ".moon")) + _node->orbit(Utils::hexStrToU64(f->substr(0,dot).c_str())); + } + } _nextBackgroundTaskDeadline = 0; uint64_t clockShouldBe = OSUtils::now(); |