mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-05 03:53:44 +02:00
fix for issue #2114
This commit is contained in:
parent
54efb62731
commit
c974a159af
1 changed files with 2 additions and 4 deletions
|
@ -997,16 +997,14 @@ void EmbeddedNetworkController::configureHTTPControlPlane(
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
json out = json::array();
|
json out = json::object();
|
||||||
std::vector<json> memTmp;
|
std::vector<json> memTmp;
|
||||||
if (_db.get(nwid, network, memTmp)) {
|
if (_db.get(nwid, network, memTmp)) {
|
||||||
for (auto m = memTmp.begin(); m != memTmp.end(); ++m) {
|
for (auto m = memTmp.begin(); m != memTmp.end(); ++m) {
|
||||||
int revision = OSUtils::jsonInt((*m)["revision"], 0);
|
int revision = OSUtils::jsonInt((*m)["revision"], 0);
|
||||||
std::string id = OSUtils::jsonString((*m)["id"], "");
|
std::string id = OSUtils::jsonString((*m)["id"], "");
|
||||||
if (id.length() == 10) {
|
if (id.length() == 10) {
|
||||||
json tmp = json::object();
|
out[id] = revision;
|
||||||
tmp[id] = revision;
|
|
||||||
out.push_back(tmp);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue