From: Maxim Mamontov Date: Fri, 3 Oct 2014 09:01:13 +0000 (+0300) Subject: Set LC_NUMERIC to C, changes service serialization format. X-Git-Url: https://git.stg.codes/stg.git/commitdiff_plain/8ea089c181fa66c80f3ad8f933fca1c96a7ba4ae Set LC_NUMERIC to C, changes service serialization format. --- 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); }