mirror of
https://github.com/ZeroTier/ZeroTierOne
synced 2025-08-14 02:27:38 -07:00
Just return files from listDirectory() since that is all we need, fix network request on network restore logic, and remember saved networks in service/One
This commit is contained in:
parent
29a2175b7a
commit
347e98dcd2
4 changed files with 20 additions and 16 deletions
|
@ -191,6 +191,15 @@ public:
|
|||
|
||||
_controlPlane = new ControlPlane(_node);
|
||||
|
||||
{
|
||||
std::vector<std::string> networksDotD(OSUtils::listDirectory((_homePath + ZT_PATH_SEPARATOR_S + "networks.d").c_str()));
|
||||
for(std::vector<std::string>::iterator f(networksDotD.begin());f!=networksDotD.end();++f) {
|
||||
std::size_t dot = f->find_last_of('.');
|
||||
if ((dot == 16)&&(f->substr(16) == ".conf"))
|
||||
_node->join(Utils::hexStrToU64(f->substr(0,dot).c_str()));
|
||||
}
|
||||
}
|
||||
|
||||
_nextBackgroundTaskDeadline = 0;
|
||||
for(;;) {
|
||||
_run_m.lock();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue