]> git.stg.codes - stg.git/blobdiff - projects/sgconf/services.cpp
Ticket. if (!data.tariffConf.changePolicy.empty()) construction added in
[stg.git] / projects / sgconf / services.cpp
index 5c63f7e40f206987769fd9f88d0f64328802f954..e2bf9bf621c3ffc00582e19dd1716724e45a4857 100644 (file)
@@ -28,7 +28,7 @@ void PrintService(const STG::GET_SERVICE::INFO & info, size_t level = 0)
 {
 std::cout << Indent(level, true) << "name: " << info.name << "\n"
           << Indent(level)       << "cost: " << info.cost << "\n"
 {
 std::cout << Indent(level, true) << "name: " << info.name << "\n"
           << Indent(level)       << "cost: " << info.cost << "\n"
-          << Indent(level)       << "payment day: " << info.payDay << "\n"
+          << Indent(level)       << "payment day: " << static_cast<unsigned>(info.payDay) << "\n"
           << Indent(level)       << "comment: " << info.comment << "\n";
 }
 
           << Indent(level)       << "comment: " << info.comment << "\n";
 }
 
@@ -87,6 +87,8 @@ bool GetServicesFunction(const SGCONF::CONFIG & config,
 {
 STG::SERVCONF proto(config.server.data(),
                     config.port.data(),
 {
 STG::SERVCONF proto(config.server.data(),
                     config.port.data(),
+                    config.localAddress.data(),
+                    config.localPort.data(),
                     config.userName.data(),
                     config.userPass.data());
 return proto.GetServices(GetServicesCallback, NULL) == STG::st_ok;
                     config.userName.data(),
                     config.userPass.data());
 return proto.GetServices(GetServicesCallback, NULL) == STG::st_ok;
@@ -98,6 +100,8 @@ bool GetServiceFunction(const SGCONF::CONFIG & config,
 {
 STG::SERVCONF proto(config.server.data(),
                     config.port.data(),
 {
 STG::SERVCONF proto(config.server.data(),
                     config.port.data(),
+                    config.localAddress.data(),
+                    config.localPort.data(),
                     config.userName.data(),
                     config.userPass.data());
 return proto.GetService(arg, GetServiceCallback, NULL) == STG::st_ok;
                     config.userName.data(),
                     config.userPass.data());
 return proto.GetService(arg, GetServiceCallback, NULL) == STG::st_ok;
@@ -109,6 +113,8 @@ bool DelServiceFunction(const SGCONF::CONFIG & config,
 {
 STG::SERVCONF proto(config.server.data(),
                     config.port.data(),
 {
 STG::SERVCONF proto(config.server.data(),
                     config.port.data(),
+                    config.localAddress.data(),
+                    config.localPort.data(),
                     config.userName.data(),
                     config.userPass.data());
 return proto.DelService(arg, SimpleCallback, NULL) == STG::st_ok;
                     config.userName.data(),
                     config.userPass.data());
 return proto.DelService(arg, SimpleCallback, NULL) == STG::st_ok;
@@ -125,6 +131,8 @@ SGCONF::MaybeSet(options, "pay-day", conf.payDay);
 SGCONF::MaybeSet(options, "comment", conf.comment);
 STG::SERVCONF proto(config.server.data(),
                     config.port.data(),
 SGCONF::MaybeSet(options, "comment", conf.comment);
 STG::SERVCONF proto(config.server.data(),
                     config.port.data(),
+                    config.localAddress.data(),
+                    config.localPort.data(),
                     config.userName.data(),
                     config.userPass.data());
 return proto.AddService(arg, conf, SimpleCallback, NULL) == STG::st_ok;
                     config.userName.data(),
                     config.userPass.data());
 return proto.AddService(arg, conf, SimpleCallback, NULL) == STG::st_ok;
@@ -141,6 +149,8 @@ SGCONF::MaybeSet(options, "pay-day", conf.payDay);
 SGCONF::MaybeSet(options, "comment", conf.comment);
 STG::SERVCONF proto(config.server.data(),
                     config.port.data(),
 SGCONF::MaybeSet(options, "comment", conf.comment);
 STG::SERVCONF proto(config.server.data(),
                     config.port.data(),
+                    config.localAddress.data(),
+                    config.localPort.data(),
                     config.userName.data(),
                     config.userPass.data());
 return proto.ChgService(conf, SimpleCallback, NULL) == STG::st_ok;
                     config.userName.data(),
                     config.userPass.data());
 return proto.ChgService(conf, SimpleCallback, NULL) == STG::st_ok;