From 1732f7371c468d7f5bb3153cb15c16b7fa688aee Mon Sep 17 00:00:00 2001 From: Joseph Henry Date: Wed, 7 Apr 2021 15:15:35 -0700 Subject: [PATCH] Minor bonding CLI fix --- node/Bond.cpp | 2 +- node/Bond.hpp | 2 +- node/BondController.cpp | 2 +- node/BondController.hpp | 2 +- one.cpp | 13 +++++++------ 5 files changed, 11 insertions(+), 10 deletions(-) diff --git a/node/Bond.cpp b/node/Bond.cpp index d6a16ad86..70088df7f 100644 --- a/node/Bond.cpp +++ b/node/Bond.cpp @@ -1830,4 +1830,4 @@ void Bond::dumpInfo(const int64_t now) // Omitted } -} // namespace ZeroTier \ No newline at end of file +} // namespace ZeroTier diff --git a/node/Bond.hpp b/node/Bond.hpp index 697aee676..50f217d2f 100644 --- a/node/Bond.hpp +++ b/node/Bond.hpp @@ -747,4 +747,4 @@ private: } // namespace ZeroTier -#endif \ No newline at end of file +#endif diff --git a/node/BondController.cpp b/node/BondController.cpp index 5692390c1..cdd74d3d1 100644 --- a/node/BondController.cpp +++ b/node/BondController.cpp @@ -209,4 +209,4 @@ void BondController::processBackgroundTasks(void *tPtr, const int64_t now) } } -} // namespace ZeroTier \ No newline at end of file +} // namespace ZeroTier diff --git a/node/BondController.hpp b/node/BondController.hpp index 7d8e8e69b..640a8f663 100644 --- a/node/BondController.hpp +++ b/node/BondController.hpp @@ -236,4 +236,4 @@ private: } // namespace ZeroTier -#endif \ No newline at end of file +#endif diff --git a/one.cpp b/one.cpp index 062781745..4c7343faa 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) {