diff options
author | slioch <slioch@eng-140.vyatta.com> | 2009-05-23 10:40:47 -0700 |
---|---|---|
committer | slioch <slioch@eng-140.vyatta.com> | 2009-05-23 10:40:47 -0700 |
commit | 4a4516eddf98be4208101bd57dae7fa0e9120228 (patch) | |
tree | 2e07484cb18df885399f91f6625a31b42b211211 | |
parent | 69adbf77521a8011100ea16eb20d1d0a7f84722e (diff) | |
download | vyatta-wanloadbalance-4a4516eddf98be4208101bd57dae7fa0e9120228.tar.gz vyatta-wanloadbalance-4a4516eddf98be4208101bd57dae7fa0e9120228.zip |
handle condition where system time changes to time before last success value. in this case set value until 0 until system time catches up. only
affect show command. issue reported by Gregor.
-rw-r--r-- | src/lboutput.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lboutput.cc b/src/lboutput.cc index 629de3e..8d60054 100644 --- a/src/lboutput.cc +++ b/src/lboutput.cc @@ -66,7 +66,8 @@ LBOutput::write(const LBData &lbdata) string time_buf; unsigned long diff_t; - if (iter->second.last_success() > 0) { + //the last condition is to handle a system time change... + if (iter->second.last_success() > 0 && (cur_t.tv_sec > iter->second.last_success())) { diff_t = cur_t.tv_sec - iter->second.last_success(); } else { |