summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2010-12-09 21:47:44 (GMT)
committerRemko Tronçon <git@el-tramo.be>2010-12-09 21:47:44 (GMT)
commit6c9ab286f209266e627bd011847c3b5d6476ddab (patch)
tree2ff8384aa7225a10500ff4d0d0e7aa6b13d083db
parent53e476d1c202119ddc87102208103675e47f9e43 (diff)
downloadswift-6c9ab286f209266e627bd011847c3b5d6476ddab.zip
swift-6c9ab286f209266e627bd011847c3b5d6476ddab.tar.bz2
Fixed namespace of stream error children.
-rw-r--r--Swiften/Parser/StreamErrorParser.cpp4
-rw-r--r--Swiften/Serializer/StreamErrorSerializer.cpp4
2 files changed, 4 insertions, 4 deletions
diff --git a/Swiften/Parser/StreamErrorParser.cpp b/Swiften/Parser/StreamErrorParser.cpp
index b121ef2..3d30d77 100644
--- a/Swiften/Parser/StreamErrorParser.cpp
+++ b/Swiften/Parser/StreamErrorParser.cpp
@@ -15,9 +15,9 @@ void StreamErrorParser::handleStartElement(const String&, const String&, const A
++level;
}
-void StreamErrorParser::handleEndElement(const String& element, const String&) {
+void StreamErrorParser::handleEndElement(const String& element, const String& ns) {
--level;
- if (level == ElementLevel) {
+ if (level == ElementLevel && ns == "urn:ietf:params:xml:ns:xmpp-streams") {
if (element == "text") {
getElementGeneric()->setText(currentText);
}
diff --git a/Swiften/Serializer/StreamErrorSerializer.cpp b/Swiften/Serializer/StreamErrorSerializer.cpp
index 720c414..14dd13f 100644
--- a/Swiften/Serializer/StreamErrorSerializer.cpp
+++ b/Swiften/Serializer/StreamErrorSerializer.cpp
@@ -46,10 +46,10 @@ String StreamErrorSerializer::serialize(boost::shared_ptr<Element> element) con
case StreamError::UnsupportedVersion: typeTag = "unsupported-version"; break;
case StreamError::XMLNotWellFormed: typeTag = "xml-not-well-formed"; break;
}
- errorElement.addNode(boost::make_shared<XMLElement>(typeTag, ""));
+ errorElement.addNode(boost::make_shared<XMLElement>(typeTag, "urn:ietf:params:xml:ns:xmpp-streams"));
if (!error->getText().isEmpty()) {
- errorElement.addNode(boost::make_shared<XMLElement>("text", "", error->getText()));
+ errorElement.addNode(boost::make_shared<XMLElement>("text", "urn:ietf:params:xml:ns:xmpp-streams", error->getText()));
}
return errorElement.serialize();