Browse Source

fixed stream features unpickle bug that appeared when no stream:features

element was provided by the server
master
Jon Kristensen 14 years ago
parent
commit
e7eff3ea50
  1. 14
      source/Network/Xmpp/Stream.hs

14
source/Network/Xmpp/Stream.hs

@ -110,12 +110,14 @@ pickleStreamFeatures :: PU [Node] ServerFeatures @@ -110,12 +110,14 @@ pickleStreamFeatures :: PU [Node] ServerFeatures
pickleStreamFeatures = xpWrap
(\(tls, sasl, rest) -> SF tls (mbl sasl) rest)
(\(SF tls sasl rest) -> (tls, lmb sasl, rest))
(xpElemNodes (Name
"features" (Just "http://etherx.jabber.org/streams") (Just "stream"))
(xpTriple
(xpOption pickleTLSFeature)
(xpOption pickleSaslFeature)
(xpAll xpElemVerbatim)
(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)
)
)
)
where

Loading…
Cancel
Save