diff options
author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2017-03-08 08:45:04 -0800 |
---|---|---|
committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2017-03-08 08:45:04 -0800 |
commit | 5249ce8fb459ed2d7fb37fdbd8a9faf2a0eb6365 (patch) | |
tree | 19e0ed2692f67194b7b6aa860ca044c6ed5056f3 /service | |
parent | ebd865dbdacba89db335613046fbc5f6ca1b2a91 (diff) | |
download | infinitytier-5249ce8fb459ed2d7fb37fdbd8a9faf2a0eb6365.tar.gz infinitytier-5249ce8fb459ed2d7fb37fdbd8a9faf2a0eb6365.zip |
Small amount of cleanup.
Diffstat (limited to 'service')
-rw-r--r-- | service/OneService.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/service/OneService.cpp b/service/OneService.cpp index 28f6dfcf..7e8a58e8 100644 --- a/service/OneService.cpp +++ b/service/OneService.cpp @@ -1132,14 +1132,18 @@ public: } json &settings = res["config"]["settings"]; settings["primaryPort"] = OSUtils::jsonInt(settings["primaryPort"],(uint64_t)_primaryPort) & 0xffff; +#ifdef ZT_USE_MINIUPNPC settings["portMappingEnabled"] = OSUtils::jsonBool(settings["portMappingEnabled"],true); +#else + settings["portMappingEnabled"] = false; // not supported in build +#endif settings["softwareUpdate"] = OSUtils::jsonString(settings["softwareUpdate"],ZT_SOFTWARE_UPDATE_DEFAULT); const World planet(_node->planet()); res["planetWorldId"] = planet.id(); res["planetWorldTimestamp"] = planet.timestamp(); - #ifdef ZT_ENABLE_CLUSTER +#ifdef ZT_ENABLE_CLUSTER json cj; ZT_ClusterStatus cs; _node->clusterStatus(&cs); @@ -1162,9 +1166,9 @@ public: cj["clusterSize"] = cs.clusterSize; } res["cluster"] = cj; - #else +#else res["cluster"] = json(); - #endif +#endif scode = 200; } else if (ps[0] == "moon") { |