diff options
author | slioch <slioch@eng-140.vyatta.com> | 2009-07-07 13:02:31 -0700 |
---|---|---|
committer | slioch <slioch@eng-140.vyatta.com> | 2009-07-07 13:02:31 -0700 |
commit | 50febe38b6c0f75076cb19bbd8b4d3fe3aa903b8 (patch) | |
tree | f9a0be0e724dc8cb8f738773257e7e05811e599e /src | |
parent | ea52f12f83b0dcb86e24242d7e4dabbbcf2b92da (diff) | |
download | vyatta-wanloadbalance-50febe38b6c0f75076cb19bbd8b4d3fe3aa903b8.tar.gz vyatta-wanloadbalance-50febe38b6c0f75076cb19bbd8b4d3fe3aa903b8.zip |
fix for bug 4587. Remove output file on orderly shutdown.
Diffstat (limited to 'src')
-rw-r--r-- | src/lboutput.cc | 7 | ||||
-rw-r--r-- | src/lboutput.hh | 3 | ||||
-rw-r--r-- | src/loadbalance.cc | 1 |
3 files changed, 11 insertions, 0 deletions
diff --git a/src/lboutput.cc b/src/lboutput.cc index ff915ec..e673ee0 100644 --- a/src/lboutput.cc +++ b/src/lboutput.cc @@ -15,6 +15,13 @@ #include "lboutput.hh" void +LBOutput::shutdown() +{ + string wlb_out = _output_path + "/wlb.out"; + unlink(wlb_out.c_str()); +} + +void LBOutput::write(const LBData &lbdata) { timeval tv; diff --git a/src/lboutput.hh b/src/lboutput.hh index 29b9a00..f79c024 100644 --- a/src/lboutput.hh +++ b/src/lboutput.hh @@ -19,6 +19,9 @@ public: ~LBOutput() {} void + shutdown(); + + void write(const LBData &lbdata); private: diff --git a/src/loadbalance.cc b/src/loadbalance.cc index 0324c08..9b2c8a5 100644 --- a/src/loadbalance.cc +++ b/src/loadbalance.cc @@ -30,6 +30,7 @@ LoadBalance::LoadBalance(bool debug, string &output_path) : LoadBalance::~LoadBalance() { _decision.shutdown(_lbdata); + _output.shutdown(); } /** |