summaryrefslogtreecommitdiff
path: root/src/xmpp/xmpp_parser.cpp
diff options
context:
space:
mode:
authorFlorent Le Coz <louiz@louiz.org>2014-04-15 04:11:27 +0200
committerFlorent Le Coz <louiz@louiz.org>2014-04-15 04:11:27 +0200
commit7f74f62e56483bae6796be82d279c5180642d53b (patch)
treed0e98105c52531ae0df3931175e8b185c50e187e /src/xmpp/xmpp_parser.cpp
parent020325dbb071f1735bceb80de9f982aefcd2de47 (diff)
parentc64bb0bde9dbf572bd4d3bbaf478ec812a2f12d6 (diff)
downloadbiboumi-7f74f62e56483bae6796be82d279c5180642d53b.tar.gz
biboumi-7f74f62e56483bae6796be82d279c5180642d53b.tar.bz2
biboumi-7f74f62e56483bae6796be82d279c5180642d53b.tar.xz
biboumi-7f74f62e56483bae6796be82d279c5180642d53b.zip
Merge branch 'master' into dummy_chan
Diffstat (limited to 'src/xmpp/xmpp_parser.cpp')
-rw-r--r--src/xmpp/xmpp_parser.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/xmpp/xmpp_parser.cpp b/src/xmpp/xmpp_parser.cpp
index 536d9da..6bb0d28 100644
--- a/src/xmpp/xmpp_parser.cpp
+++ b/src/xmpp/xmpp_parser.cpp
@@ -55,7 +55,8 @@ XmppParser::~XmppParser()
int XmppParser::feed(const char* data, const int len, const bool is_final)
{
int res = XML_Parse(this->parser, data, len, is_final);
- if (res == 0)
+ if (res == XML_STATUS_ERROR &&
+ (XML_GetErrorCode(this->parser) != XML_ERROR_FINISHED))
log_error("Xml_Parse encountered an error: " <<
XML_ErrorString(XML_GetErrorCode(this->parser)))
return res;
@@ -64,7 +65,7 @@ int XmppParser::feed(const char* data, const int len, const bool is_final)
int XmppParser::parse(const int len, const bool is_final)
{
int res = XML_ParseBuffer(this->parser, len, is_final);
- if (res == 0)
+ if (res == XML_STATUS_ERROR)
log_error("Xml_Parsebuffer encountered an error: " <<
XML_ErrorString(XML_GetErrorCode(this->parser)));
return res;