git.stg.codes
/
stg.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Some refactoring.
[stg.git]
/
stglibs
/
srvconf.lib
/
servconf.cpp
diff --git
a/stglibs/srvconf.lib/servconf.cpp
b/stglibs/srvconf.lib/servconf.cpp
index 430de3c146d20d430a564201cd592c02e5a75eea..e7ecfdf4d75a4b0d74b08fd2361336200b665599 100644
(file)
--- 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);
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);
const std::string & GetStrError() const;
static void Start(void * data, const char * el, const char ** attr);
@@
-348,11
+349,13
@@
int ret = 0;
if ((ret = nt.Connect()) != st_ok)
{
errorMsg = nt.GetError();
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();
return ret;
}
if ((ret = nt.Transact(request, ParserRecv, this)) != st_ok)
{
errorMsg = nt.GetError();
+ cp.Failure(errorMsg);
return ret;
}
return ret;
}