From 8ea089c181fa66c80f3ad8f933fca1c96a7ba4ae Mon Sep 17 00:00:00 2001 From: Maxim Mamontov Date: Fri, 3 Oct 2014 12:01:13 +0300 Subject: [PATCH] Set LC_NUMERIC to C, changes service serialization format. --- stglibs/srvconf.lib/servconf.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/stglibs/srvconf.lib/servconf.cpp b/stglibs/srvconf.lib/servconf.cpp index 78db78c8..71d36a7b 100644 --- a/stglibs/srvconf.lib/servconf.cpp +++ b/stglibs/srvconf.lib/servconf.cpp @@ -281,7 +281,7 @@ return pImpl->Exec("", f int SERVCONF::ChgService(const SERVICE_CONF_RES & conf, SIMPLE::CALLBACK f, void * data) { -return pImpl->Exec("SetService", "" + CHG_SERVICE::Serialize(conf, pImpl->Encoding()) + "", f, data); +return pImpl->Exec("SetService", "Encoding()) + "/>", f, data); } int SERVCONF::AddService(const std::string & name, @@ -291,7 +291,7 @@ int SERVCONF::AddService(const std::string & name, int res = pImpl->Exec("AddService", "", f, data); if (res != st_ok) return res; -return pImpl->Exec("SetService", "" + CHG_SERVICE::Serialize(conf, pImpl->Encoding()) + "", f, data); +return pImpl->Exec("SetService", "Encoding()) + "/>", f, data); } int SERVCONF::DelService(const std::string & name, SIMPLE::CALLBACK f, void * data) @@ -342,6 +342,7 @@ SERVCONF::IMPL::IMPL(const std::string & server, uint16_t port, : nt(server, port, login, password) { setlocale(LC_ALL, ""); +setlocale(LC_NUMERIC, "C"); encoding = nl_langinfo(CODESET); parser = XML_ParserCreate(NULL); } @@ -352,6 +353,7 @@ SERVCONF::IMPL::IMPL(const std::string & server, uint16_t port, : nt(server, port, localAddress, localPort, login, password) { setlocale(LC_ALL, ""); +setlocale(LC_NUMERIC, "C"); encoding = nl_langinfo(CODESET); parser = XML_ParserCreate(NULL); } -- 2.44.2