X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/b62e305a926ed58d509d93afccaf1e8cb40df6b8..d6619016c144071dab0b4b32bdea6d0ede9e32d1:/projects/stargazer/plugins/configuration/rpcconfig/info_methods.cpp?ds=inline diff --git a/projects/stargazer/plugins/configuration/rpcconfig/info_methods.cpp b/projects/stargazer/plugins/configuration/rpcconfig/info_methods.cpp index 11cf970c..7d3afaca 100644 --- a/projects/stargazer/plugins/configuration/rpcconfig/info_methods.cpp +++ b/projects/stargazer/plugins/configuration/rpcconfig/info_methods.cpp @@ -1,5 +1,7 @@ #include +#include // xmlrpc-c devs have missed something :) + #include "stg/version.h" #include "stg/common.h" #include "info_methods.h" @@ -26,18 +28,18 @@ un += " "; un += utsn.nodename; structVal["version"] = xmlrpc_c::value_string(SERVER_VERSION); -structVal["tariff_num"] = xmlrpc_c::value_int(tariffs->GetTariffsNum()); +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->GetUserNum()); +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; for (int i = 0; i< DIR_NUM; i++) { - dirnameVal.push_back(xmlrpc_c::value_string(dirNames[i])); + dirnameVal.push_back(xmlrpc_c::value_string(IconvString(dirNames[i], "KOI8-RU", "UTF-8"))); } structVal["dir_names"] = xmlrpc_c::value_array(dirnameVal); @@ -75,8 +77,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);