[Snap Framework] snap-server branch, master, updated. ce2dda1290fddfb62a5fd8be498e5b40219786f7

noreply at snapframework.com noreply at snapframework.com
Sun Feb 20 11:20:19 CST 2011


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "snap-server".

The branch, master has been updated
       via  ce2dda1290fddfb62a5fd8be498e5b40219786f7 (commit)
      from  0fa039c33c16ee116fb0ef686d93d9beb80bb573 (commit)


Summary of changes:
 src/Snap/Internal/Http/Server/GnuTLS.hs |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit ce2dda1290fddfb62a5fd8be498e5b40219786f7
Author: Gregory Collins <greg at gregorycollins.net>
Date:   Sun Feb 20 18:20:13 2011 +0100

    Try #3 to fix gnutls compile error

diff --git a/src/Snap/Internal/Http/Server/GnuTLS.hs b/src/Snap/Internal/Http/Server/GnuTLS.hs
index 6ed32a4..a8ace90 100644
--- a/src/Snap/Internal/Http/Server/GnuTLS.hs
+++ b/src/Snap/Internal/Http/Server/GnuTLS.hs
@@ -205,7 +205,7 @@ send tickleTimeout onBlock (NetworkSession { _session = session}) bs =
 -- could be changed to use unsafePackCStringFinalizer if the buffer is at
 -- least 3/4 full and packCStringLen otherwise or something like that
 recv :: IO b -> NetworkSession -> IO (Maybe ByteString)
-recv onBlock (NetworkSession _ session recvLen') = do
+recv onBlock (NetworkSession _ session recvLen) = do
     fp <- BI.mallocByteString recvLen
     sz <- withForeignPtr fp loop
     if sz <= 0
@@ -213,9 +213,8 @@ recv onBlock (NetworkSession _ session recvLen') = do
        else return $ Just $ BI.fromForeignPtr fp 0 $ fromEnum sz
 
   where
-    recvLen = fromEnum recvLen'
     loop recvBuf = do
-        size <- gnutls_record_recv (castPtr session) recvBuf recvLen
+        size <- gnutls_record_recv (castPtr session) recvBuf $ toEnum recvLen
         let size' = fromIntegral size
         case size' of
             x | x >= 0        -> return x
-----------------------------------------------------------------------


hooks/post-receive
-- 
snap-server


More information about the Snap mailing list