X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/91b5ae18ae465d0887785aab6dc0eb7abc0d5488..d3b6a58593b94c9ff41c30a7517086d607f28f10:/projects/stargazer/plugins/configuration/rpcconfig/admins_methods.cpp?ds=sidebyside diff --git a/projects/stargazer/plugins/configuration/rpcconfig/admins_methods.cpp b/projects/stargazer/plugins/configuration/rpcconfig/admins_methods.cpp index f36debc4..ad9c0324 100644 --- a/projects/stargazer/plugins/configuration/rpcconfig/admins_methods.cpp +++ b/projects/stargazer/plugins/configuration/rpcconfig/admins_methods.cpp @@ -1,7 +1,8 @@ -#include "admins_methods.h" +#include // xmlrpc-c devs have missed something :) +#include "stg/common.h" +#include "admins_methods.h" #include "rpcconfig.h" -#include "common.h" //------------------------------------------------------------------------------ @@ -24,7 +25,7 @@ if (config->GetAdminInfo(cookie, &adminInfo)) ADMIN * admin; -if (admins->FindAdmin(login, &admin)) +if (admins->Find(login, &admin)) { structVal["result"] = xmlrpc_c::value_boolean(false); *retvalPtr = xmlrpc_c::value_struct(structVal); @@ -68,7 +69,7 @@ if (config->GetAdminInfo(cookie, &adminInfo)) ADMIN * admin; -if (admins->FindAdmin(adminInfo.admin, &admin)) +if (admins->Find(adminInfo.admin, &admin)) { printfd(__FILE__, "METHOD_ADMIN_ADD::execute(): 'Invalid admin (logged)'\n"); *retvalPtr = xmlrpc_c::value_boolean(false); @@ -105,7 +106,7 @@ if (config->GetAdminInfo(cookie, &adminInfo)) ADMIN * admin; -if (admins->FindAdmin(adminInfo.admin, &admin)) +if (admins->Find(adminInfo.admin, &admin)) { *retvalPtr = xmlrpc_c::value_boolean(false); return; @@ -140,7 +141,7 @@ if (config->GetAdminInfo(cookie, &adminInfo)) ADMIN * loggedAdmin; -if (admins->FindAdmin(adminInfo.admin, &loggedAdmin)) +if (admins->Find(adminInfo.admin, &loggedAdmin)) { *retvalPtr = xmlrpc_c::value_boolean(false); return; @@ -148,7 +149,7 @@ if (admins->FindAdmin(adminInfo.admin, &loggedAdmin)) ADMIN * admin; -if (admins->FindAdmin(login, &admin)) +if (admins->Find(login, &admin)) { *retvalPtr = xmlrpc_c::value_boolean(false); return; @@ -222,14 +223,14 @@ void METHOD_ADMINS_GET::execute(xmlrpc_c::paramList const & paramList, std::string cookie = paramList.getString(0); paramList.verifyEnd(1); -std::map structVal; +std::map mainStructVal; std::vector retval; ADMIN_INFO adminInfo; if (config->GetAdminInfo(cookie, &adminInfo)) { - structVal["result"] = xmlrpc_c::value_boolean(false); - *retvalPtr = xmlrpc_c::value_struct(structVal); + mainStructVal["result"] = xmlrpc_c::value_boolean(false); + *retvalPtr = xmlrpc_c::value_struct(mainStructVal); return; }