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. 18
      source/Network/Xmpp/Stream.hs

18
source/Network/Xmpp/Stream.hs

@ -110,14 +110,16 @@ pickleStreamFeatures :: PU [Node] ServerFeatures @@ -110,14 +110,16 @@ 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"))
(xpTriple
(xpOption pickleTLSFeature)
(xpOption pickleSaslFeature)
(xpAll xpElemVerbatim)
)
(xpElemNodes
(Name
"features"
(Just "http://etherx.jabber.org/streams")
(Just "stream")
)
(xpTriple
(xpOption pickleTLSFeature)
(xpOption pickleSaslFeature)
(xpAll xpElemVerbatim)
)
)
where

Loading…
Cancel
Save