diff options
Diffstat (limited to 'Swiften/Parser/StreamResumedParser.cpp')
-rw-r--r-- | Swiften/Parser/StreamResumedParser.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/Swiften/Parser/StreamResumedParser.cpp b/Swiften/Parser/StreamResumedParser.cpp index 9c7be50..f69bad1 100644 --- a/Swiften/Parser/StreamResumedParser.cpp +++ b/Swiften/Parser/StreamResumedParser.cpp @@ -17,20 +17,20 @@ StreamResumedParser::~StreamResumedParser() { } void StreamResumedParser::handleStartElement(const std::string&, const std::string&, const AttributeMap& attributes) { - if (level == TopLevel) { - boost::optional<std::string> handledStanzasCount = attributes.getAttributeValue("h"); - if (handledStanzasCount) { - try { - getElementGeneric()->setHandledStanzasCount(boost::lexical_cast<unsigned int>(*handledStanzasCount)); - } - catch (const boost::bad_lexical_cast &) { - } - } - getElementGeneric()->setResumeID(attributes.getAttribute("previd")); - } - ++level; + if (level == TopLevel) { + boost::optional<std::string> handledStanzasCount = attributes.getAttributeValue("h"); + if (handledStanzasCount) { + try { + getElementGeneric()->setHandledStanzasCount(boost::lexical_cast<unsigned int>(*handledStanzasCount)); + } + catch (const boost::bad_lexical_cast &) { + } + } + getElementGeneric()->setResumeID(attributes.getAttribute("previd")); + } + ++level; } void StreamResumedParser::handleEndElement(const std::string&, const std::string&) { - --level; + --level; } |