Browse Source

i was wrong about the possibility of encountering an empty

stream:features element
master
Jon Kristensen 14 years ago
parent
commit
d46caa7afa
  1. 10
      source/Network/Xmpp/Stream.hs

10
source/Network/Xmpp/Stream.hs

@ -110,16 +110,18 @@ pickleStreamFeatures :: PU [Node] ServerFeatures @@ -110,16 +110,18 @@ pickleStreamFeatures :: PU [Node] ServerFeatures
pickleStreamFeatures = xpWrap
(\(tls, sasl, rest) -> SF tls (mbl sasl) rest)
(\(SF tls sasl rest) -> (tls, lmb sasl, rest))
(xpDefault (Nothing, Nothing, []) -- In case there is no features element.
(xpElemNodes (Name
"features" (Just "http://etherx.jabber.org/streams") (Just "stream"))
(xpElemNodes
(Name
"features"
(Just "http://etherx.jabber.org/streams")
(Just "stream")
)
(xpTriple
(xpOption pickleTLSFeature)
(xpOption pickleSaslFeature)
(xpAll xpElemVerbatim)
)
)
)
where
pickleTLSFeature :: PU [Node] Bool
pickleTLSFeature = xpElemNodes "{urn:ietf:params:xml:ns:xmpp-tls}starttls"

Loading…
Cancel
Save