X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/02be813c72c75c61beaef0266bd5adf713e67b42..acdf6ab94fee26ebc4017bf32cf6171c7d9462e9:/projects/stargazer/plugins/configuration/rpcconfig/info_methods.cpp diff --git a/projects/stargazer/plugins/configuration/rpcconfig/info_methods.cpp b/projects/stargazer/plugins/configuration/rpcconfig/info_methods.cpp index b971c638..e0c371cd 100644 --- a/projects/stargazer/plugins/configuration/rpcconfig/info_methods.cpp +++ b/projects/stargazer/plugins/configuration/rpcconfig/info_methods.cpp @@ -1,9 +1,15 @@ -#include +#include "info_methods.h" +#include "rpcconfig.h" +#include "stg/users.h" +#include "stg/tariffs.h" #include "stg/version.h" #include "stg/common.h" -#include "info_methods.h" -#include "rpcconfig.h" +#include "stg/const.h" + +#include // xmlrpc-c devs have missed something :) + +#include void METHOD_INFO::execute(xmlrpc_c::paramList const & paramList, xmlrpc_c::value * const retvalPtr) @@ -26,12 +32,12 @@ un += " "; un += utsn.nodename; structVal["version"] = xmlrpc_c::value_string(SERVER_VERSION); -structVal["tariff_num"] = xmlrpc_c::value_int(tariffs->Count()); +structVal["tariff_num"] = xmlrpc_c::value_int(static_cast(tariffs->Count())); structVal["tariff"] = xmlrpc_c::value_int(2); -structVal["users_num"] = xmlrpc_c::value_int(users->Count()); +structVal["users_num"] = xmlrpc_c::value_int(static_cast(users->Count())); structVal["uname"] = xmlrpc_c::value_string(un); structVal["dir_num"] = xmlrpc_c::value_int(DIR_NUM); -structVal["day_fee"] = xmlrpc_c::value_int(dayFee); +structVal["day_fee"] = xmlrpc_c::value_int(static_cast(dayFee)); std::vector dirnameVal; @@ -75,8 +81,6 @@ void METHOD_LOGOUT::execute(xmlrpc_c::paramList const & paramList, std::string cookie = paramList.getString(0); paramList.verifyEnd(1); -std::map structVal; - if (config->LogoutAdmin(cookie)) { *retvalPtr = xmlrpc_c::value_boolean(false);