summaryrefslogtreecommitdiff
path: root/service/OneService.cpp
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2017-01-27 14:05:09 -0800
committerAdam Ierymenko <adam.ierymenko@gmail.com>2017-01-27 14:05:09 -0800
commit0b3b994241161c996c8432a2fb25e47b0f84c359 (patch)
tree561d93d4d873c1ca0175c73f3ab2b9c4cc310bff /service/OneService.cpp
parentbc218f9414bd6e4124eb223c7c69c5ac254befff (diff)
downloadinfinitytier-0b3b994241161c996c8432a2fb25e47b0f84c359.tar.gz
infinitytier-0b3b994241161c996c8432a2fb25e47b0f84c359.zip
Relay policy can now be computed.
Diffstat (limited to 'service/OneService.cpp')
-rw-r--r--service/OneService.cpp9
1 files changed, 1 insertions, 8 deletions
diff --git a/service/OneService.cpp b/service/OneService.cpp
index 6d9effa1..f6174d42 100644
--- a/service/OneService.cpp
+++ b/service/OneService.cpp
@@ -694,7 +694,7 @@ public:
_controlPlane->addAuthToken(authToken.c_str());
_controlPlane->setController(_controller);
- { // Remember networks from previous session
+ { // Load existing networks
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('.');
@@ -981,13 +981,6 @@ public:
if (settings.is_object()) {
_portMappingEnabled = OSUtils::jsonBool(settings["portMappingEnabled"],true);
- const std::string rp(OSUtils::jsonString(settings["relayPolicy"],""));
- if ((rp == "always")||(rp == "ALWAYS"))
- _node->setRelayPolicy(ZT_RELAY_POLICY_ALWAYS);
- else if ((rp == "never")||(rp == "NEVER"))
- _node->setRelayPolicy(ZT_RELAY_POLICY_NEVER);
- else _node->setRelayPolicy(ZT_RELAY_POLICY_TRUSTED);
-
const std::string up(OSUtils::jsonString(settings["softwareUpdate"],ZT_SOFTWARE_UPDATE_DEFAULT));
const bool udist = OSUtils::jsonBool(settings["softwareUpdateDist"],false);
if (((up == "apply")||(up == "download"))||(udist)) {