X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/70778b6263943f67b0e85aa50a16d48805d714e5..078ab6852ff1674f99d03fd697018a96bdb12d81:/projects/stargazer/plugins/configuration/rpcconfig/tariffs_methods.cpp?ds=inline diff --git a/projects/stargazer/plugins/configuration/rpcconfig/tariffs_methods.cpp b/projects/stargazer/plugins/configuration/rpcconfig/tariffs_methods.cpp index 23916ae7..77d73b02 100644 --- a/projects/stargazer/plugins/configuration/rpcconfig/tariffs_methods.cpp +++ b/projects/stargazer/plugins/configuration/rpcconfig/tariffs_methods.cpp @@ -1,10 +1,12 @@ -#include "rpcconfig.h" +#include // xmlrpc-c devs have missed something :) + #include "tariffs_methods.h" +#include "rpcconfig.h" #include "tariff_helper.h" -#include "../../../tariffs.h" -#include "../../../users.h" -#include "../../../admins.h" -#include "../../../admin.h" +#include "stg/tariffs.h" +#include "stg/users.h" +#include "stg/admins.h" +#include "stg/admin.h" void METHOD_TARIFF_GET::execute(xmlrpc_c::paramList const & paramList, xmlrpc_c::value * const retvalPtr) @@ -32,9 +34,7 @@ if (!tariff) return; } -TARIFF_DATA td; - -tariff->GetTariffData(&td); +TARIFF_DATA td(tariff->GetTariffData()); TARIFF_HELPER helper(td); @@ -57,9 +57,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; @@ -73,9 +73,7 @@ if (!tariff) return; } -TARIFF_DATA td; - -tariff->GetTariffData(&td); +TARIFF_DATA td(tariff->GetTariffData()); TARIFF_HELPER helper(td); @@ -129,7 +127,6 @@ void METHOD_TARIFF_ADD::execute(xmlrpc_c::paramList const & paramList, { std::string cookie = paramList.getString(0); std::string tariff = paramList.getString(1); -std::string enc; paramList.verifyEnd(2); ADMIN_INFO adminInfo; @@ -140,9 +137,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; @@ -172,9 +169,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;