mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-08 05:23:44 +02:00
fix bond post logic
This commit is contained in:
parent
42ab81906b
commit
0eecb8a8a0
1 changed files with 3 additions and 1 deletions
|
@ -1632,15 +1632,17 @@ public:
|
||||||
|
|
||||||
std::vector<World> moons(_node->moons());
|
std::vector<World> moons(_node->moons());
|
||||||
const uint64_t id = Utils::hexStrToU64(input.str().c_str());
|
const uint64_t id = Utils::hexStrToU64(input.str().c_str());
|
||||||
|
bool found = false;
|
||||||
auto out = json::object();
|
auto out = json::object();
|
||||||
for(std::vector<World>::const_iterator m(moons.begin());m!=moons.end();++m) {
|
for(std::vector<World>::const_iterator m(moons.begin());m!=moons.end();++m) {
|
||||||
if (m->id() == id) {
|
if (m->id() == id) {
|
||||||
_moonToJson(out,*m);
|
_moonToJson(out,*m);
|
||||||
|
found = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (seed != 0) {
|
if (!found && seed != 0) {
|
||||||
char tmp[64];
|
char tmp[64];
|
||||||
OSUtils::ztsnprintf(tmp,sizeof(tmp),"%.16llx",id);
|
OSUtils::ztsnprintf(tmp,sizeof(tmp),"%.16llx",id);
|
||||||
out["id"] = tmp;
|
out["id"] = tmp;
|
||||||
|
|
Loading…
Add table
Reference in a new issue