[Pkg-haskell-commits] [SCM] haskell-testpack branch, master, updated. debian/1.0.2-1-4-gb0d6b36

John Goerzen jgoerzen at complete.org
Fri Apr 23 14:46:01 UTC 2010


The following commit has been merged in the master branch:
commit 164085ca66641c8e9daeb19b968e83769a349e6a
Author: John Goerzen <jgoerzen at complete.org>
Date:   Tue Oct 26 01:28:26 2004 +0100

    Eliminated duplicate handle for main socket
    
    Keywords:
    
    
    (jgoerzen at complete.org--projects/missingh--head--0.5--patch-6)

diff --git a/ChangeLog b/ChangeLog
index 7574940..8723cf0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,18 @@
 # arch-tag: automatic-ChangeLog--jgoerzen at complete.org--projects/missingh--head--0.5
 #
 
+2004-10-25 19:28:26 GMT	John Goerzen <jgoerzen at complete.org>	patch-6
+
+    Summary:
+      Eliminated duplicate handle for main socket
+    Revision:
+      missingh--head--0.5--patch-6
+
+
+    modified files:
+     ChangeLog libsrc/MissingH/Network/FTP/Client.hs
+
+
 2004-10-25 15:27:35 GMT	John Goerzen <jgoerzen at complete.org>	patch-5
 
     Summary:
diff --git a/libsrc/MissingH/Network/FTP/Client.hs b/libsrc/MissingH/Network/FTP/Client.hs
index aa1f035..cb5f2d7 100644
--- a/libsrc/MissingH/Network/FTP/Client.hs
+++ b/libsrc/MissingH/Network/FTP/Client.hs
@@ -231,7 +231,6 @@ import MissingH.Logging.Logger
 import MissingH.Network
 import MissingH.Str
 data FTPConnection = FTPConnection {readh :: IO String,
-                                    readh_internal :: Handle,
                                     writeh :: Handle,
                                     socket_internal :: Socket,
                                     isPassive :: Bool}
@@ -282,14 +281,11 @@ connectFTP h p =
         in
     do
     s <- connectTCP h p
-    r <- socketToHandle s ReadMode
-    hSetBuffering r LineBuffering
-    w <- socketToHandle s WriteMode
-    hSetBuffering w LineBuffering
-    let h = FTPConnection {readh = readchars r, 
-                           readh_internal = r,
+    newh <- socketToHandle s ReadWriteMode
+    hSetBuffering newh LineBuffering
+    let h = FTPConnection {readh = readchars newh, 
                            socket_internal = s,
-                           writeh = w, isPassive = True}
+                           writeh = newh, isPassive = True}
     --hIsReadable h >>= print
     --hIsWritable h >>= print
     -- hSetBuffering h LineBuffering

-- 
haskell-testpack



More information about the Pkg-haskell-commits mailing list