From: Maxim Mamontov Date: Mon, 12 Sep 2011 09:37:33 +0000 (+0300) Subject: SMUX reload with reconnect implemented X-Git-Tag: 2.408-rc1~85 X-Git-Url: https://git.stg.codes/stg.git/commitdiff_plain/d67dfa3a891c9e2bab9dff880ee568862ef3b740 SMUX reload with reconnect implemented --- 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; }