It previously didn't look at standby_for_name unless standby_for_rank
was set!
Also, we now let it print out standby_for_rank on any value that isn't
set to the default (-1), since -2 means something.
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
<< " seq " << info.state_seq;
if (info.laggy())
out << " laggy since " << info.laggy_since;
- if (info.standby_for_rank >= 0 ||
- info.standby_for_rank >= 0) {
+ if (info.standby_for_rank != -1 ||
+ !info.standby_for_name.empty()) {
out << " (standby for";
- if (info.standby_for_rank >= 0)
+ //if (info.standby_for_rank >= 0)
out << " rank " << info.standby_for_rank;
- if (info.standby_for_name.length())
+ if (!info.standby_for_name.empty())
out << " '" << info.standby_for_name << "'";
out << ")";
}