mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-05 03:53:44 +02:00
Fix for bug #1403
This commit is contained in:
parent
15905b2fe3
commit
b64ae8c8a5
1 changed files with 4 additions and 7 deletions
11
one.cpp
11
one.cpp
|
@ -499,7 +499,6 @@ static int cli(int argc,char **argv)
|
||||||
}
|
}
|
||||||
/* zerotier-cli bond list */
|
/* zerotier-cli bond list */
|
||||||
if (arg1 == "list") {
|
if (arg1 == "list") {
|
||||||
fprintf(stderr, "zerotier-cli bond list\n");
|
|
||||||
const unsigned int scode = Http::GET(1024 * 1024 * 16,60000,(const struct sockaddr *)&addr,"/bonds",requestHeaders,responseHeaders,responseBody);
|
const unsigned int scode = Http::GET(1024 * 1024 * 16,60000,(const struct sockaddr *)&addr,"/bonds",requestHeaders,responseHeaders,responseBody);
|
||||||
if (scode == 0) {
|
if (scode == 0) {
|
||||||
printf("Error connecting to the ZeroTier service: %s\n\nPlease check that the service is running and that TCP port 9993 can be contacted via 127.0.0.1." ZT_EOL_S, responseBody.c_str());
|
printf("Error connecting to the ZeroTier service: %s\n\nPlease check that the service is running and that TCP port 9993 can be contacted via 127.0.0.1." ZT_EOL_S, responseBody.c_str());
|
||||||
|
@ -525,11 +524,11 @@ static int cli(int argc,char **argv)
|
||||||
for(unsigned long k=0;k<j.size();++k) {
|
for(unsigned long k=0;k<j.size();++k) {
|
||||||
nlohmann::json &p = j[k];
|
nlohmann::json &p = j[k];
|
||||||
bool isBonded = p["isBonded"];
|
bool isBonded = p["isBonded"];
|
||||||
int8_t bondingPolicy = p["bondingPolicy"];
|
|
||||||
bool isHealthy = p["isHealthy"];
|
|
||||||
int8_t numAliveLinks = p["numAliveLinks"];
|
|
||||||
int8_t numTotalLinks = p["numTotalLinks"];
|
|
||||||
if (isBonded) {
|
if (isBonded) {
|
||||||
|
int8_t bondingPolicy = p["bondingPolicy"];
|
||||||
|
bool isHealthy = p["isHealthy"];
|
||||||
|
int8_t numAliveLinks = p["numAliveLinks"];
|
||||||
|
int8_t numTotalLinks = p["numTotalLinks"];
|
||||||
bFoundBond = true;
|
bFoundBond = true;
|
||||||
std::string healthStr;
|
std::string healthStr;
|
||||||
if (isHealthy) {
|
if (isHealthy) {
|
||||||
|
@ -710,9 +709,7 @@ static int cli(int argc,char **argv)
|
||||||
if (j.is_array()) {
|
if (j.is_array()) {
|
||||||
for(unsigned long k=0;k<j.size();++k) {
|
for(unsigned long k=0;k<j.size();++k) {
|
||||||
nlohmann::json &p = j[k];
|
nlohmann::json &p = j[k];
|
||||||
|
|
||||||
bool isBonded = p["isBonded"];
|
bool isBonded = p["isBonded"];
|
||||||
|
|
||||||
if (isBonded) {
|
if (isBonded) {
|
||||||
int8_t bondingPolicy = p["bondingPolicy"];
|
int8_t bondingPolicy = p["bondingPolicy"];
|
||||||
bool isHealthy = p["isHealthy"];
|
bool isHealthy = p["isHealthy"];
|
||||||
|
|
Loading…
Add table
Reference in a new issue