extern "C" PLUGIN * GetPlugin();
RPC_CONFIG_SETTINGS::RPC_CONFIG_SETTINGS()
- : errorStr(),
- port(0),
+ : port(0),
cookieTimeout(0)
{
}
pv.param = "Port";
std::vector<PARAM_VALUE>::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");
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
}
}
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"))
{
}
users
));
rpcRegistry.addMethod("stargazer.get_online_ips", methodGetOnlinIPsPtr);
+
+xmlrpc_c::methodPtr const methodGetUserAuthByPtr(new METHOD_GET_USER_AUTH_BY(
+ this,
+ users
+ ));
+rpcRegistry.addMethod("stargazer.get_user_auth_by", methodGetUserAuthByPtr);
}