X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/a94639179750883b1120be2f5d01bbb38eaa0928..3fad7c91ed37f6b644d6126fccb28c2de11490f0:/projects/stargazer/plugins/configuration/rpcconfig/rpcconfig.cpp diff --git a/projects/stargazer/plugins/configuration/rpcconfig/rpcconfig.cpp b/projects/stargazer/plugins/configuration/rpcconfig/rpcconfig.cpp index dca87fbe..3b28ddd8 100644 --- a/projects/stargazer/plugins/configuration/rpcconfig/rpcconfig.cpp +++ b/projects/stargazer/plugins/configuration/rpcconfig/rpcconfig.cpp @@ -33,8 +33,7 @@ PLUGIN_CREATOR rpcc; extern "C" PLUGIN * GetPlugin(); RPC_CONFIG_SETTINGS::RPC_CONFIG_SETTINGS() - : errorStr(), - port(0), + : port(0), cookieTimeout(0) { } @@ -45,7 +44,7 @@ PARAM_VALUE pv; pv.param = "Port"; std::vector::const_iterator pvi; pvi = std::find(s.moduleParams.begin(), s.moduleParams.end(), pv); -if (pvi == s.moduleParams.end()) +if (pvi == s.moduleParams.end() || pvi->value.empty()) { errorStr = "Parameter \'Port\' not found."; printfd(__FILE__, "Parameter 'Port' not found\n"); @@ -62,7 +61,7 @@ port = static_cast(p); pv.param = "CookieTimeout"; pvi = std::find(s.moduleParams.begin(), s.moduleParams.end(), pv); -if (pvi == s.moduleParams.end()) +if (pvi == s.moduleParams.end() || pvi->value.empty()) { cookieTimeout = 1800; // 30 * 60 } @@ -85,22 +84,15 @@ return rpcc.GetPlugin(); } RPC_CONFIG::RPC_CONFIG() - : errorStr(), - rpcConfigSettings(), - users(NULL), + : users(NULL), admins(NULL), tariffs(NULL), store(NULL), - settings(), fd(-1), - rpcRegistry(), rpcServer(NULL), running(false), stopped(true), - tid(), - cookies(), dayFee(0), - dirNames(), logger(GetPluginLogger(GetStgLogger(), "conf_rpc")) { }