Skip to content

Commit

Permalink
Merge pull request #2115 from zerotier/gh-2114
Browse files Browse the repository at this point in the history
fix for issue #2114
  • Loading branch information
glimberg authored Aug 28, 2023
2 parents 54efb62 + c974a15 commit 72533cb
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions controller/EmbeddedNetworkController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -997,16 +997,14 @@ void EmbeddedNetworkController::configureHTTPControlPlane(
return;
}

json out = json::array();
json out = json::object();
std::vector<json> memTmp;
if (_db.get(nwid, network, memTmp)) {
for (auto m = memTmp.begin(); m != memTmp.end(); ++m) {
int revision = OSUtils::jsonInt((*m)["revision"], 0);
std::string id = OSUtils::jsonString((*m)["id"], "");
if (id.length() == 10) {
json tmp = json::object();
tmp[id] = revision;
out.push_back(tmp);
out[id] = revision;
}
}
}
Expand Down

0 comments on commit 72533cb

Please sign in to comment.