|
|
|
@ -179,23 +179,28 @@ connect address hostname = do |
|
|
|
Left (StreamNotStreamElement _name) -> do |
|
|
|
Left (StreamNotStreamElement _name) -> do |
|
|
|
_ <- pushElement $ pickleElem xpStreamError $ |
|
|
|
_ <- pushElement $ pickleElem xpStreamError $ |
|
|
|
XmppStreamError StreamInvalidXml Nothing Nothing |
|
|
|
XmppStreamError StreamInvalidXml Nothing Nothing |
|
|
|
|
|
|
|
xmppCloseStreams |
|
|
|
return () |
|
|
|
return () |
|
|
|
Left (StreamInvalidStreamNamespace _ns) -> do |
|
|
|
Left (StreamInvalidStreamNamespace _ns) -> do |
|
|
|
_ <- pushElement $ pickleElem xpStreamError $ |
|
|
|
_ <- pushElement $ pickleElem xpStreamError $ |
|
|
|
XmppStreamError StreamInvalidNamespace Nothing Nothing |
|
|
|
XmppStreamError StreamInvalidNamespace Nothing Nothing |
|
|
|
|
|
|
|
xmppCloseStreams |
|
|
|
return () |
|
|
|
return () |
|
|
|
Left (StreamInvalidStreamPrefix _prefix) -> do |
|
|
|
Left (StreamInvalidStreamPrefix _prefix) -> do |
|
|
|
_ <- pushElement $ pickleElem xpStreamError $ |
|
|
|
_ <- pushElement $ pickleElem xpStreamError $ |
|
|
|
XmppStreamError StreamBadNamespacePrefix Nothing Nothing |
|
|
|
XmppStreamError StreamBadNamespacePrefix Nothing Nothing |
|
|
|
|
|
|
|
xmppCloseStreams |
|
|
|
return () |
|
|
|
return () |
|
|
|
-- TODO: Catch remaining xmppStartStream errors. |
|
|
|
-- TODO: Catch remaining xmppStartStream errors. |
|
|
|
Left (StreamWrongVersion _ver) -> do |
|
|
|
Left (StreamWrongVersion _ver) -> do |
|
|
|
_ <- pushElement $ pickleElem xpStreamError $ |
|
|
|
_ <- pushElement $ pickleElem xpStreamError $ |
|
|
|
XmppStreamError StreamUnsupportedVersion Nothing Nothing |
|
|
|
XmppStreamError StreamUnsupportedVersion Nothing Nothing |
|
|
|
|
|
|
|
xmppCloseStreams |
|
|
|
return () |
|
|
|
return () |
|
|
|
Left (StreamWrongLangTag _lang) -> do |
|
|
|
Left (StreamWrongLangTag _lang) -> do |
|
|
|
_ <- pushElement $ pickleElem xpStreamError $ |
|
|
|
_ <- pushElement $ pickleElem xpStreamError $ |
|
|
|
XmppStreamError StreamInvalidXml Nothing Nothing |
|
|
|
XmppStreamError StreamInvalidXml Nothing Nothing |
|
|
|
|
|
|
|
xmppCloseStreams |
|
|
|
return () |
|
|
|
return () |
|
|
|
Right () -> |
|
|
|
Right () -> |
|
|
|
return () |
|
|
|
return () |
|
|
|
|