summaryrefslogtreecommitdiff
path: root/one.cpp
diff options
context:
space:
mode:
authorJoseph Henry <[email protected]>2021-04-07 15:15:35 -0700
committerJoseph Henry <[email protected]>2021-04-07 15:15:35 -0700
commit1732f7371c468d7f5bb3153cb15c16b7fa688aee (patch)
tree69cb948c88784d46a155c26b1c46da8403e44b03 /one.cpp
parent5262a2f7530b64ead386c02268afea0b5b1e94bd (diff)
Minor bonding CLI fix
Diffstat (limited to 'one.cpp')
-rw-r--r--one.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/one.cpp b/one.cpp
index 06278174..4c7343fa 100644
--- a/one.cpp
+++ b/one.cpp
@@ -494,7 +494,7 @@ static int cli(int argc,char **argv)
} else if (command == "bond") {
/* zerotier-cli bond */
if (arg1.empty()) {
- printf("(bond) command is missing required arugments" ZT_EOL_S);
+ printf("(bond) command is missing required arguments" ZT_EOL_S);
return 2;
}
/* zerotier-cli bond list */
@@ -676,7 +676,7 @@ static int cli(int argc,char **argv)
}
}
/* zerotier-cli bond command was malformed in some way */
- printf("(bond) command is missing required arugments" ZT_EOL_S);
+ printf("(bond) command is missing required arguments" ZT_EOL_S);
return 2;
const unsigned int scode = Http::GET(1024 * 1024 * 16,60000,(const struct sockaddr *)&addr,"/bonds",requestHeaders,responseHeaders,responseBody);
if (scode == 0) {
@@ -713,12 +713,13 @@ static int cli(int argc,char **argv)
nlohmann::json &p = j[k];
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) {
+ int8_t bondingPolicy = p["bondingPolicy"];
+ bool isHealthy = p["isHealthy"];
+ int8_t numAliveLinks = p["numAliveLinks"];
+ int8_t numTotalLinks = p["numTotalLinks"];
+
bFoundBond = true;
std::string healthStr;
if (isHealthy) {