From c6743bd12ba2b66f2bae9256419d81ef119c87e4 Mon Sep 17 00:00:00 2001 From: Philipp Balzarek Date: Tue, 25 Feb 2014 15:29:30 +0100 Subject: [PATCH] quench warnings --- source/Network/Xmpp/Concurrent.hs | 1 - source/Network/Xmpp/Sasl.hs | 4 ++-- source/Network/Xmpp/Stream.hs | 12 ++++++------ source/Network/Xmpp/Tls.hs | 1 - 4 files changed, 8 insertions(+), 10 deletions(-) diff --git a/source/Network/Xmpp/Concurrent.hs b/source/Network/Xmpp/Concurrent.hs index 65f22d2..c176877 100644 --- a/source/Network/Xmpp/Concurrent.hs +++ b/source/Network/Xmpp/Concurrent.hs @@ -138,7 +138,6 @@ handleIQ iqHands out sta as = do -- IQ was sent to a (full) JID. The answer has to come from -- the same exact JID. Right j -> iqFrom iq == Just j - _ -> False case expected of True -> do let answer = Just (either IQResponseError diff --git a/source/Network/Xmpp/Sasl.hs b/source/Network/Xmpp/Sasl.hs index 4dbd19c..b373e70 100644 --- a/source/Network/Xmpp/Sasl.hs +++ b/source/Network/Xmpp/Sasl.hs @@ -102,8 +102,8 @@ xmppBind rsrc c = runErrorT $ do case answer of Right IQResult{iqResultPayload = Just b} -> do lift $ debugM "Pontarius.Xmpp" "xmppBind: IQ result received; unpickling JID..." - let jid = unpickleElem xpJid' b - case jid of + let j = unpickleElem xpJid' b + case j of Right jid' -> do lift $ infoM "Pontarius.Xmpp" $ "Bound JID: " ++ show jid' _ <- lift $ withStream ( do modify $ \s -> diff --git a/source/Network/Xmpp/Stream.hs b/source/Network/Xmpp/Stream.hs index 0ea6957..05a7737 100644 --- a/source/Network/Xmpp/Stream.hs +++ b/source/Network/Xmpp/Stream.hs @@ -111,12 +111,12 @@ startStream = runErrorT $ do -- state of the stream. let expectedTo = case ( streamConnectionState st , toJid $ streamConfiguration st) of - (Plain , (Just (jid, True))) -> Just jid - (Plain , _ ) -> Nothing - (Secured , (Just (jid, _ ))) -> Just jid - (Secured , Nothing ) -> Nothing - (Closed , _ ) -> Nothing - (Finished , _ ) -> Nothing + (Plain , (Just (j, True))) -> Just j + (Plain , _ ) -> Nothing + (Secured , (Just (j, _ ))) -> Just j + (Secured , Nothing ) -> Nothing + (Closed , _ ) -> Nothing + (Finished , _ ) -> Nothing case streamAddress st of Nothing -> do lift $ lift $ errorM "Pontarius.Xmpp" "Server sent no hostname." diff --git a/source/Network/Xmpp/Tls.hs b/source/Network/Xmpp/Tls.hs index 1fec7d8..638f4e4 100644 --- a/source/Network/Xmpp/Tls.hs +++ b/source/Network/Xmpp/Tls.hs @@ -19,7 +19,6 @@ import Data.IORef import Data.XML.Types import Network.DNS.Resolver (ResolvConf) import Network.TLS -import Network.TLS.Extra import Network.Xmpp.Stream import Network.Xmpp.Types import System.Log.Logger (debugM, errorM, infoM)