[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:53:29 UTC 2010


The following commit has been merged in the master branch:
commit 9660a97ea1257d1dc0805482d8ce126125979fff
Author: John Goerzen <jgoerzen at complete.org>
Date:   Wed Dec 22 23:45:33 2004 +0100

    Checkpointing
    
    Keywords:
    
    
    (jgoerzen at complete.org--projects/missingh--head--0.7--patch-142)

diff --git a/ChangeLog b/ChangeLog
index fe8f7dd..0746048 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,19 @@
 # arch-tag: automatic-ChangeLog--jgoerzen at complete.org--projects/missingh--head--0.7
 #
 
+2004-12-22 16:45:33 GMT	John Goerzen <jgoerzen at complete.org>	patch-142
+
+    Summary:
+      Checkpointing
+    Revision:
+      missingh--head--0.7--patch-142
+
+
+    modified files:
+     ChangeLog libsrc/MissingH/Network/FTP/Server.hs
+     libsrc/MissingH/Network/SocketServer.hs
+
+
 2004-12-22 16:41:05 GMT	John Goerzen <jgoerzen at complete.org>	patch-141
 
     Summary:
diff --git a/libsrc/MissingH/Network/FTP/Server.hs b/libsrc/MissingH/Network/FTP/Server.hs
index 73b8f7c..788d723 100644
--- a/libsrc/MissingH/Network/FTP/Server.hs
+++ b/libsrc/MissingH/Network/FTP/Server.hs
@@ -66,10 +66,14 @@ data AuthState = NoAuth
               | User String
               | Authenticated String
                 deriving (Eq, Show)
+data DataChan = NoChannel
+              | PassiveMode Socket SockAddr
+              | PortMode SockAddr
 data FTPState = FTPState
               { auth :: IORef AuthState,
                 datatype :: IORef DataType,
-                rename :: IORef (Maybe String)}
+                rename :: IORef (Maybe String),
+                datachan :: IORef DataChan}
 
 data FTPServer = forall a. HVFS a => FTPServer Handle a FTPState
 
@@ -102,8 +106,9 @@ anonFtpHandler f h sa =
           do authr <- newIORef (NoAuth)
              typer <- newIORef ASCII
              renamer <- newIORef (Nothing::Maybe String)
+             chanr <- newIORef (NoChannel)
              let s = serv (FTPState {auth = authr, datatype = typer,
-                                    rename = renamer})
+                                    rename = renamer, datachan = chanr})
              sendReply s 220 "Welcome to MissingH.Network.FTP.Server."
              commandLoop s sa
 
diff --git a/libsrc/MissingH/Network/SocketServer.hs b/libsrc/MissingH/Network/SocketServer.hs
index 1c6fe96..2d71fda 100644
--- a/libsrc/MissingH/Network/SocketServer.hs
+++ b/libsrc/MissingH/Network/SocketServer.hs
@@ -69,10 +69,15 @@ data InetServerOptions  = InetServerOptions {listenQueueSize :: Int,
                                             }
     deriving (Eq, Show)
 
-type HandlerT = Socket                  -- ^ The socket to use for communication
-              -> SockAddr               -- ^ Address of the remote
-              -> SockAddr               -- ^ Local address
-              -> IO ()
+{- | The main handler type.
+
+The first parameter is the socket itself.
+
+The second is the address of the remote endpoint.
+
+The third is the address of the local endpoint.
+-}
+type HandlerT = Socket -> SockAddr -> SockAddr -> IO ()
                      
 {- | Get Default options.  You can always modify it later. -}
 simpleTCPOptions :: Int                -- ^ Port Number

-- 
haskell-testpack



More information about the Pkg-haskell-commits mailing list