mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-07-29 21:32:50 +02:00
fix build error
This commit is contained in:
parent
bd6be51a75
commit
7d9af55411
1 changed files with 11 additions and 2 deletions
|
@ -1547,11 +1547,16 @@ public:
|
||||||
exit(0);
|
exit(0);
|
||||||
SharedPtr<Bond> bond = _node->bondController()->getBondByPeerId(id);
|
SharedPtr<Bond> bond = _node->bondController()->getBondByPeerId(id);
|
||||||
if (bond) {
|
if (bond) {
|
||||||
scode = bond->abForciblyRotateLink() ? 200 : 400;
|
if (bond->abForciblyRotateLink()) {
|
||||||
|
res.status = 200;
|
||||||
|
} else {
|
||||||
|
res.status = 400;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
fprintf(stderr, "unable to find bond to peer %llx\n", (unsigned long long)id);
|
fprintf(stderr, "unable to find bond to peer %llx\n", (unsigned long long)id);
|
||||||
scode = 400;
|
res.status = 400;
|
||||||
}
|
}
|
||||||
|
res.set_content("{}", "application/json");
|
||||||
};
|
};
|
||||||
_controlPlane.Post("/bond/rotate/([0-9a-fA-F]{10})", bondRotate);
|
_controlPlane.Post("/bond/rotate/([0-9a-fA-F]{10})", bondRotate);
|
||||||
_controlPlane.Put("/bond/rotate/([0-9a-fA-F]{10})", bondRotate);
|
_controlPlane.Put("/bond/rotate/([0-9a-fA-F]{10})", bondRotate);
|
||||||
|
@ -1838,6 +1843,10 @@ public:
|
||||||
});
|
});
|
||||||
|
|
||||||
_serverThread = std::thread([&] {
|
_serverThread = std::thread([&] {
|
||||||
|
if (_primaryPort==0) {
|
||||||
|
fprintf(stderr, "unable to determine local control port");
|
||||||
|
exit(-1);
|
||||||
|
}
|
||||||
fprintf(stderr, "Starting Control Plane...\n");
|
fprintf(stderr, "Starting Control Plane...\n");
|
||||||
_controlPlane.listen("0.0.0.0", _primaryPort);
|
_controlPlane.listen("0.0.0.0", _primaryPort);
|
||||||
fprintf(stderr, "Control Plane Stopped\n");
|
fprintf(stderr, "Control Plane Stopped\n");
|
||||||
|
|
Loading…
Add table
Reference in a new issue