From d67dfa3a891c9e2bab9dff880ee568862ef3b740 Mon Sep 17 00:00:00 2001 From: Maxim Mamontov Date: Mon, 12 Sep 2011 12:37:33 +0300 Subject: [PATCH] SMUX reload with reconnect implemented --- projects/stargazer/plugins/other/smux/smux.cpp | 9 +++++++++ projects/stargazer/plugins/other/smux/smux.h | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/projects/stargazer/plugins/other/smux/smux.cpp b/projects/stargazer/plugins/other/smux/smux.cpp index bcfc940e..8faccc2d 100644 --- a/projects/stargazer/plugins/other/smux/smux.cpp +++ b/projects/stargazer/plugins/other/smux/smux.cpp @@ -256,6 +256,15 @@ printfd(__FILE__, "SMUX::Stop() - After\n"); return 0; } +int SMUX::Reload() +{ +if (Stop()) + return -1; +if (Start()) + return -1; +return 0; +} + void * SMUX::Runner(void * d) { SMUX * smux = static_cast(d); diff --git a/projects/stargazer/plugins/other/smux/smux.h b/projects/stargazer/plugins/other/smux/smux.h index 45f16ea6..e16ae5f2 100644 --- a/projects/stargazer/plugins/other/smux/smux.h +++ b/projects/stargazer/plugins/other/smux/smux.h @@ -109,7 +109,7 @@ public: int Start(); int Stop(); - int Reload() { return 0; } + int Reload(); bool IsRunning() { return running && !stopped; } const std::string & GetStrError() const { return errorStr; } -- 2.43.2