Improve bond tracing, fix bond initialization bugs, remove vestigial debug code
This commit is contained in:
parent
9f4985b11a
commit
edd960566a
10 changed files with 353 additions and 277 deletions
5
one.cpp
5
one.cpp
|
@ -492,6 +492,7 @@ static int cli(int argc,char **argv)
|
|||
if (json) {
|
||||
printf("%s" ZT_EOL_S,OSUtils::jsonDump(j).c_str());
|
||||
} else {
|
||||
bool bFoundBond = false;
|
||||
printf(" <peer> <bondtype> <status> <links>" ZT_EOL_S);
|
||||
if (j.is_array()) {
|
||||
for(unsigned long k=0;k<j.size();++k) {
|
||||
|
@ -504,6 +505,7 @@ static int cli(int argc,char **argv)
|
|||
int8_t numTotalLinks = p["numTotalLinks"];
|
||||
|
||||
if (isBonded) {
|
||||
bFoundBond = true;
|
||||
std::string healthStr;
|
||||
if (isHealthy) {
|
||||
healthStr = "HEALTHY";
|
||||
|
@ -524,6 +526,9 @@ static int cli(int argc,char **argv)
|
|||
}
|
||||
}
|
||||
}
|
||||
if (!bFoundBond) {
|
||||
printf(" NONE\t\t\t\tNONE\t NONE NONE" ZT_EOL_S);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue