From 7209e1cfae64f68911e657335df8ae91f4fb6f5b Mon Sep 17 00:00:00 2001 From: John Millikin Date: Sun, 28 Jun 2009 04:50:08 +0000 Subject: [PATCH] Use new leak-safe helper functions from GSASL. --- Network/Protocol/XMPP/SASL.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Network/Protocol/XMPP/SASL.hs b/Network/Protocol/XMPP/SASL.hs index d7ca1cb..96634cb 100644 --- a/Network/Protocol/XMPP/SASL.hs +++ b/Network/Protocol/XMPP/SASL.hs @@ -41,14 +41,14 @@ authenticate stream userJID serverJID username password = do let authz = jidFormat userJID let hostname = jidFormat serverJID - ctxt <- G.mkContext + G.withContext $ \ctxt -> do suggested <- G.clientSuggestMechanism ctxt mechanisms mechanism <- case suggested of Just m -> return m Nothing -> error "No supported SASL mechanisms advertised" - s <- G.clientStart ctxt mechanism + G.withSession (G.clientStart ctxt mechanism) $ \s -> do G.propertySet s G.GSASL_AUTHZID authz G.propertySet s G.GSASL_AUTHID username -- 2.38.5