diff options
Diffstat (limited to 'Swiften/Parser/AuthRequestParser.cpp')
-rw-r--r-- | Swiften/Parser/AuthRequestParser.cpp | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/Swiften/Parser/AuthRequestParser.cpp b/Swiften/Parser/AuthRequestParser.cpp index 4d21fc4..a24be8d 100644 --- a/Swiften/Parser/AuthRequestParser.cpp +++ b/Swiften/Parser/AuthRequestParser.cpp @@ -1,10 +1,11 @@ /* - * Copyright (c) 2010 Isode Limited. + * Copyright (c) 2010-2016 Isode Limited. * All rights reserved. * See the COPYING file for more information. */ #include <Swiften/Parser/AuthRequestParser.h> + #include <Swiften/StringCodecs/Base64.h> namespace Swift { @@ -13,21 +14,21 @@ AuthRequestParser::AuthRequestParser() : GenericElementParser<AuthRequest>(), de } void AuthRequestParser::handleStartElement(const std::string&, const std::string&, const AttributeMap& attribute) { - if (depth_ == 0) { - getElementGeneric()->setMechanism(attribute.getAttribute("mechanism")); - } - ++depth_; + if (depth_ == 0) { + getElementGeneric()->setMechanism(attribute.getAttribute("mechanism")); + } + ++depth_; } void AuthRequestParser::handleEndElement(const std::string&, const std::string&) { - --depth_; - if (depth_ == 0) { - getElementGeneric()->setMessage(createSafeByteArray(Base64::decode(text_))); - } + --depth_; + if (depth_ == 0) { + getElementGeneric()->setMessage(createSafeByteArray(Base64::decode(text_))); + } } void AuthRequestParser::handleCharacterData(const std::string& text) { - text_ += text; + text_ += text; } } |