X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/5ec330c9443a3ad42258159e11013c116d9c4978..404df1535f297c18bcfdbac1472268507185d998:/stglibs/srvconf.lib/servconf.cpp diff --git a/stglibs/srvconf.lib/servconf.cpp b/stglibs/srvconf.lib/servconf.cpp index 16878f18..c7bf3d00 100644 --- a/stglibs/srvconf.lib/servconf.cpp +++ b/stglibs/srvconf.lib/servconf.cpp @@ -60,6 +60,7 @@ class SERVCONF::IMPL public: IMPL(const std::string & server, uint16_t port, const std::string & login, const std::string & password); + ~IMPL() { XML_ParserFree(parser); } const std::string & GetStrError() const; static void Start(void * data, const char * el, const char ** attr); @@ -350,7 +351,7 @@ if ((ret = nt.Connect()) != st_ok) errorMsg = nt.GetError(); return ret; } -if ((ret = nt.Transact(request.c_str(), ParserRecv, this)) != st_ok) +if ((ret = nt.Transact(request, ParserRecv, this)) != st_ok) { errorMsg = nt.GetError(); return ret; @@ -370,7 +371,7 @@ if ((ret = nt.Connect()) != st_ok) return ret; } std::string response; -if ((ret = nt.Transact(request.c_str(), SimpleRecv, &response)) != st_ok) +if ((ret = nt.Transact(request, SimpleRecv, &response)) != st_ok) { errorMsg = nt.GetError(); callback(false, errorMsg, "", data);