mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-06 20:43:44 +02:00
Small amount of cleanup.
This commit is contained in:
parent
ebd865dbda
commit
5249ce8fb4
1 changed files with 7 additions and 3 deletions
|
@ -1132,14 +1132,18 @@ public:
|
||||||
}
|
}
|
||||||
json &settings = res["config"]["settings"];
|
json &settings = res["config"]["settings"];
|
||||||
settings["primaryPort"] = OSUtils::jsonInt(settings["primaryPort"],(uint64_t)_primaryPort) & 0xffff;
|
settings["primaryPort"] = OSUtils::jsonInt(settings["primaryPort"],(uint64_t)_primaryPort) & 0xffff;
|
||||||
|
#ifdef ZT_USE_MINIUPNPC
|
||||||
settings["portMappingEnabled"] = OSUtils::jsonBool(settings["portMappingEnabled"],true);
|
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);
|
settings["softwareUpdate"] = OSUtils::jsonString(settings["softwareUpdate"],ZT_SOFTWARE_UPDATE_DEFAULT);
|
||||||
|
|
||||||
const World planet(_node->planet());
|
const World planet(_node->planet());
|
||||||
res["planetWorldId"] = planet.id();
|
res["planetWorldId"] = planet.id();
|
||||||
res["planetWorldTimestamp"] = planet.timestamp();
|
res["planetWorldTimestamp"] = planet.timestamp();
|
||||||
|
|
||||||
#ifdef ZT_ENABLE_CLUSTER
|
#ifdef ZT_ENABLE_CLUSTER
|
||||||
json cj;
|
json cj;
|
||||||
ZT_ClusterStatus cs;
|
ZT_ClusterStatus cs;
|
||||||
_node->clusterStatus(&cs);
|
_node->clusterStatus(&cs);
|
||||||
|
@ -1162,9 +1166,9 @@ public:
|
||||||
cj["clusterSize"] = cs.clusterSize;
|
cj["clusterSize"] = cs.clusterSize;
|
||||||
}
|
}
|
||||||
res["cluster"] = cj;
|
res["cluster"] = cj;
|
||||||
#else
|
#else
|
||||||
res["cluster"] = json();
|
res["cluster"] = json();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
scode = 200;
|
scode = 200;
|
||||||
} else if (ps[0] == "moon") {
|
} else if (ps[0] == "moon") {
|
||||||
|
|
Loading…
Add table
Reference in a new issue