X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/73f662acc31034cd98fdc6e157454f7763ef0792..1347f3d1e04bedd1508589173f577673ee2c5554:/projects/stargazer/plugins/other/smux/smux.cpp diff --git a/projects/stargazer/plugins/other/smux/smux.cpp b/projects/stargazer/plugins/other/smux/smux.cpp index 81b9ccb5..31b91bb3 100644 --- a/projects/stargazer/plugins/other/smux/smux.cpp +++ b/projects/stargazer/plugins/other/smux/smux.cpp @@ -20,12 +20,12 @@ #include "smux.h" #include "utils.h" +namespace +{ PLUGIN_CREATOR smc; -PLUGIN * GetPlugin() -{ -return smc.GetPlugin(); -} +bool SPrefixLess(const Sensors::value_type & a, + const Sensors::value_type & b); bool SPrefixLess(const Sensors::value_type & a, const Sensors::value_type & b) @@ -33,6 +33,15 @@ bool SPrefixLess(const Sensors::value_type & a, return a.first.PrefixLess(b.first); } +} + +extern "C" PLUGIN * GetPlugin(); + +PLUGIN * GetPlugin() +{ +return smc.GetPlugin(); +} + SMUX_SETTINGS::SMUX_SETTINGS() : errorStr(), ip(0), @@ -60,7 +69,7 @@ if (ParseIntInRange(pvi->value[0], 2, 65535, &p)) printfd(__FILE__, "Cannot parse parameter 'Port'\n"); return -1; } -port = p; +port = static_cast(p); pv.param = "Password"; pvi = std::find(s.moduleParams.begin(), s.moduleParams.end(), pv);