X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/8569ecdc2c9368dc0fe650b901cce7b37337ffec..8b5d7715bf0eb81d5627267b7bcb42cbc5d5e2f0:/stglibs/srvconf.lib/servconf.cpp diff --git a/stglibs/srvconf.lib/servconf.cpp b/stglibs/srvconf.lib/servconf.cpp index 430de3c1..915691cf 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); @@ -236,7 +237,7 @@ return pImpl->Exec("", int SERVCONF::SendMessage(const std::string & login, const std::string & text, SIMPLE::CALLBACK f, void * data) { -return pImpl->Exec("SendMessage", "", f, data); +return pImpl->Exec("SendMessageResult", "", f, data); } int SERVCONF::CheckUser(const std::string & login, const std::string & password, SIMPLE::CALLBACK f, void * data) @@ -348,11 +349,13 @@ int ret = 0; if ((ret = nt.Connect()) != st_ok) { errorMsg = nt.GetError(); + cp.Failure(errorMsg); return ret; } if ((ret = nt.Transact(request, ParserRecv, this)) != st_ok) { errorMsg = nt.GetError(); + cp.Failure(errorMsg); return ret; }