X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/641204dfbdb9fc870cdd2e7f9e3169a44693e7bf..2d8751468836d2c5d92dee3328f22ceefbc0c47b:/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 4eae81fd..3607a806 100644 --- a/projects/stargazer/plugins/configuration/rpcconfig/admins_methods.cpp +++ b/projects/stargazer/plugins/configuration/rpcconfig/admins_methods.cpp @@ -1,5 +1,5 @@ +#include "stg/common.h" #include "admins_methods.h" - #include "rpcconfig.h" //------------------------------------------------------------------------------ @@ -21,9 +21,9 @@ if (config->GetAdminInfo(cookie, &adminInfo)) return; } -ADMIN admin; +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); @@ -31,10 +31,10 @@ if (admins->FindAdmin(login, &admin)) } structVal["result"] = xmlrpc_c::value_boolean(true); -structVal["login"] = xmlrpc_c::value_string(admin.GetLogin()); -structVal["password"] = xmlrpc_c::value_string(admin.GetPassword()); +structVal["login"] = xmlrpc_c::value_string(admin->GetLogin()); +structVal["password"] = xmlrpc_c::value_string(admin->GetPassword()); -const PRIV * priv = admin.GetPriv(); +const PRIV * priv = admin->GetPriv(); structVal["user_stat"] = xmlrpc_c::value_boolean(priv->userStat); structVal["user_conf"] = xmlrpc_c::value_boolean(priv->userConf); @@ -65,9 +65,9 @@ if (config->GetAdminInfo(cookie, &adminInfo)) return; } -ADMIN admin; +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); @@ -102,9 +102,9 @@ if (config->GetAdminInfo(cookie, &adminInfo)) return; } -ADMIN admin; +ADMIN * admin; -if (admins->FindAdmin(adminInfo.admin, &admin)) +if (admins->Find(adminInfo.admin, &admin)) { *retvalPtr = xmlrpc_c::value_boolean(false); return; @@ -137,17 +137,17 @@ if (config->GetAdminInfo(cookie, &adminInfo)) return; } -ADMIN loggedAdmin; +ADMIN * loggedAdmin; -if (admins->FindAdmin(adminInfo.admin, &loggedAdmin)) +if (admins->Find(adminInfo.admin, &loggedAdmin)) { *retvalPtr = xmlrpc_c::value_boolean(false); return; } -ADMIN admin; +ADMIN * admin; -if (admins->FindAdmin(login, &admin)) +if (admins->Find(login, &admin)) { *retvalPtr = xmlrpc_c::value_boolean(false); return; @@ -155,8 +155,8 @@ if (admins->FindAdmin(login, &admin)) ADMIN_CONF conf; -conf.priv = *admin.GetPriv(); -conf.password = admin.GetPassword(); +conf.priv = *admin->GetPriv(); +conf.password = admin->GetPassword(); conf.login = login; std::map structVal(