From 77ba2f5a96084fa2eb6f52c7122b5ef32d326ef6 Mon Sep 17 00:00:00 2001 From: Maxim Mamontov Date: Thu, 25 Nov 2010 18:42:27 +0200 Subject: [PATCH] =?utf8?q?=D0=9F=D1=80=D0=B8=20=D0=B8=D0=B7=D0=BC=D0=B5?= =?utf8?q?=D0=BD=D0=B5=D0=BD=D0=B8=D0=B8=20=D0=BF=D0=BE=D0=BB=D1=8C=D0=B7?= =?utf8?q?=D0=BE=D0=B2=D0=B0=D1=82=D0=B5=D0=BB=D1=8F=20=D1=87=D0=B5=D1=80?= =?utf8?q?=D0=B5=D0=B7=20XML=20RPC=20=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB?= =?utf8?q?=D0=B5=D0=BD=D0=BE=20=D0=B8=D0=B7=D0=BC=D0=B5=D0=BD=D0=B5=D0=BD?= =?utf8?q?=D0=B8=D0=B5=20=D1=81=D0=BE=D1=81=D1=82=D0=BE=D1=8F=D0=BD=D0=B8?= =?utf8?q?=D1=8F=20=D1=81=D1=87=D0=B5=D1=82=D0=B0.=20=D0=A2=D0=B0=D0=BA-?= =?utf8?q?=D0=B6=D0=B5=20=D0=B8=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB=D0=B5?= =?utf8?q?=D0=BD=20=D1=82=D0=B8=D0=BF=20=D0=B4=D0=B0=D0=BD=D0=BD=D1=8B?= =?utf8?q?=D1=85=20=D0=BE=20=D1=82=D1=80=D0=B0=D1=84=D0=B8=D0=BA=D0=B5=20(?= =?utf8?q?std::string,=20=D0=BF=D0=BE=D1=82=D0=BE=D0=BC=D1=83=20=D1=87?= =?utf8?q?=D1=82=D0=BE=20XML=20RPC=20=D0=BD=D0=B5=D1=83=D0=B2=D0=B5=D1=80?= =?utf8?q?=D0=B5=D0=BD=D0=BD=D0=BE=20=D1=80=D0=B0=D0=B1=D0=BE=D1=82=D0=B0?= =?utf8?q?=D0=B5=D1=82=20=D1=81=2064-=D0=B1=D0=B8=D1=82=D0=BD=D1=8B=D0=BC?= =?utf8?q?=D0=B8=20=D1=86=D0=B5=D0=BB=D1=8B=D0=BC=D0=B8).?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../configuration/rpcconfig/user_helper.cpp | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/projects/stargazer/plugins/configuration/rpcconfig/user_helper.cpp b/projects/stargazer/plugins/configuration/rpcconfig/user_helper.cpp index 62dcd1af..7f10eae4 100644 --- a/projects/stargazer/plugins/configuration/rpcconfig/user_helper.cpp +++ b/projects/stargazer/plugins/configuration/rpcconfig/user_helper.cpp @@ -195,6 +195,18 @@ if ((it = structVal.find("email")) != structVal.end()) } } +if ((it = structVal.find("cash")) != structVal.end()) + { + bool res = iter->property.cash.Set(xmlrpc_c::value_double(it->second), + admin, + login, + &store); + if (!res) + { + return true; + } + } + if ((it = structVal.find("creditexpire")) != structVal.end()) { bool res = iter->property.creditExpire.Set(xmlrpc_c::value_int(it->second), @@ -231,7 +243,7 @@ if ((it = structVal.find("freemb")) != structVal.end()) } } -if ((it = structVal.find("disabled")) != structVal.end()) +if ((it = structVal.find("down")) != structVal.end()) { bool res = iter->property.disabled.Set(xmlrpc_c::value_boolean(it->second), admin, @@ -352,12 +364,11 @@ if ((it = structVal.find("traff")) != structVal.end()) static_cast >(xmlrpc_c::value_struct(it->second)) ); - std::vector data; DIR_TRAFF dtData; dtData = iter->property.up.Get(); if ((it = traff.find("mu")) != traff.end()) { - data = xmlrpc_c::value_array(it->second).vectorValueValue(); + std::vector data(xmlrpc_c::value_array(it->second).vectorValueValue()); for (int i = 0; i < std::min(DIR_NUM, static_cast(data.size())); ++i) { @@ -383,7 +394,7 @@ if ((it = structVal.find("traff")) != structVal.end()) dtData = iter->property.down.Get(); if ((it = traff.find("md")) != traff.end()) { - data = xmlrpc_c::value_array(it->second).vectorValueValue(); + std::vector data(xmlrpc_c::value_array(it->second).vectorValueValue()); for (int i = 0; i < std::min(DIR_NUM, static_cast(data.size())); ++i) { -- 2.44.2