From ac39481cf76ae84ea196d0cdc9cb4a849355b7ef Mon Sep 17 00:00:00 2001 From: slioch Date: Wed, 29 Oct 2008 11:17:03 -0700 Subject: fix for bug 3843. added warning level syslong messages on any interface that changes state in wan lb. --- src/lbdata.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/lbdata.cc b/src/lbdata.cc index 470279a..bfaffcd 100644 --- a/src/lbdata.cc +++ b/src/lbdata.cc @@ -7,6 +7,7 @@ */ #include #include +#include #include #include "lbdata.hh" @@ -167,14 +168,17 @@ LBData::dump() bool LBData::state_changed() { + bool overall_state = false; LBData::InterfaceHealthIter h_iter = _iface_health_coll.begin(); while (h_iter != _iface_health_coll.end()) { if (h_iter->second.state_changed()) { - return true; + string tmp = (h_iter->second._is_active ? string("ACTIVE") : string("FAILED")); + syslog(LOG_WARNING, "Interface %s has changed state to %s",h_iter->first.c_str(),tmp.c_str()); + overall_state = true; } ++h_iter; } - return false; + return overall_state; } /** -- cgit v1.2.3