From da2745d00fd2d5c28d3c6464487b66e040ae5322 Mon Sep 17 00:00:00 2001
From: Philipp Balzarek
Date: Fri, 1 Mar 2013 23:03:17 +0100
Subject: [PATCH] fix stream feature pickler a name space was missing
---
source/Network/Xmpp/Marshal.hs | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/source/Network/Xmpp/Marshal.hs b/source/Network/Xmpp/Marshal.hs
index 8d47217..1360e56 100644
--- a/source/Network/Xmpp/Marshal.hs
+++ b/source/Network/Xmpp/Marshal.hs
@@ -247,7 +247,7 @@ xpStream = xpElemAttrs
-- Pickler/Unpickler for the stream features - TLS, SASL, and the rest.
xpStreamFeatures :: PU [Node] StreamFeatures
-xpStreamFeatures = xpWrap
+xpStreamFeatures = ("xpStreamFeatures","") > xpWrap
(\(tls, sasl, rest) -> StreamFeatures tls (mbl sasl) rest)
(\(StreamFeatures tls sasl rest) -> (tls, lmb sasl, rest))
(xpElemNodes
@@ -264,10 +264,11 @@ xpStreamFeatures = xpWrap
)
where
pickleTlsFeature :: PU [Node] Bool
- pickleTlsFeature = xpElemNodes "{urn:ietf:params:xml:ns:xmpp-tls}starttls"
- (xpElemExists "required")
+ pickleTlsFeature = ("pickleTlsFeature", "") >
+ xpElemNodes "{urn:ietf:params:xml:ns:xmpp-tls}starttls"
+ (xpElemExists "{urn:ietf:params:xml:ns:xmpp-tls}required")
pickleSaslFeature :: PU [Node] [Text]
- pickleSaslFeature = xpElemNodes
- "{urn:ietf:params:xml:ns:xmpp-sasl}mechanisms"
+ pickleSaslFeature = ("pickleSaslFeature", "") >
+ xpElemNodes "{urn:ietf:params:xml:ns:xmpp-sasl}mechanisms"
(xpAll $ xpElemNodes
"{urn:ietf:params:xml:ns:xmpp-sasl}mechanism" (xpContent xpId))