diff options
Diffstat (limited to 'Swiften/Parser/StreamResumeParser.cpp')
-rw-r--r-- | Swiften/Parser/StreamResumeParser.cpp | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/Swiften/Parser/StreamResumeParser.cpp b/Swiften/Parser/StreamResumeParser.cpp index cb1a61d..a6ca444 100644 --- a/Swiften/Parser/StreamResumeParser.cpp +++ b/Swiften/Parser/StreamResumeParser.cpp @@ -1,7 +1,7 @@ /* - * Copyright (c) 2011 Remko Tronçon - * Licensed under the GNU General Public License v3. - * See Documentation/Licenses/GPLv3.txt for more information. + * Copyright (c) 2011 Isode Limited. + * All rights reserved. + * See the COPYING file for more information. */ #include <Swiften/Parser/StreamResumeParser.h> @@ -17,20 +17,20 @@ StreamResumeParser::~StreamResumeParser() { } void StreamResumeParser::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 StreamResumeParser::handleEndElement(const std::string&, const std::string&) { - --level; + --level; } |