[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:52:50 UTC 2010
The following commit has been merged in the master branch:
commit b5618fc9e37a70036f30392bfdb1465b1d0d5631
Author: John Goerzen <jgoerzen at complete.org>
Date: Wed Dec 22 02:05:43 2004 +0100
Checkpointing
Keywords:
(jgoerzen at complete.org--projects/missingh--head--0.7--patch-129)
diff --git a/ChangeLog b/ChangeLog
index e375abc..e8e787e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,18 @@
# arch-tag: automatic-ChangeLog--jgoerzen at complete.org--projects/missingh--head--0.7
#
+2004-12-21 19:05:43 GMT John Goerzen <jgoerzen at complete.org> patch-129
+
+ Summary:
+ Checkpointing
+ Revision:
+ missingh--head--0.7--patch-129
+
+
+ modified files:
+ ChangeLog libsrc/MissingH/Network/FTP/Server.hs
+
+
2004-12-21 18:01:53 GMT John Goerzen <jgoerzen at complete.org> patch-128
Summary:
diff --git a/libsrc/MissingH/Network/FTP/Server.hs b/libsrc/MissingH/Network/FTP/Server.hs
index 242dc17..375eddb 100644
--- a/libsrc/MissingH/Network/FTP/Server.hs
+++ b/libsrc/MissingH/Network/FTP/Server.hs
@@ -73,10 +73,10 @@ sendReply h codei text =
in
writethis (map (rstrip) (lines text))
-{- | Main FTP handler; pass this to
+{- | Main FTP handler; pass the result of applying this to one argument to
'MissingH.Network.SocketServer.handleHandler' -}
-ftpHandler :: (forall a. HVFS a => a) -> Handle -> SockAddr -> IO ()
+ftpHandler :: forall a. HVFS a => a -> Handle -> SockAddr -> IO ()
ftpHandler f h sa =
let serv = FTPServer {fs = f, handle = h}
in
@@ -89,6 +89,7 @@ type CommandHandler = FTPServer -> SockAddr -> String -> IO Bool
commands :: [(String, (CommandHandler, (String, String)))]
commands =
[("HELP", (cmd_help, help_help))
+ ,("QUIT", (cmd_quit, help_quit))
]
commandLoop :: FTPServer -> SockAddr -> IO ()
@@ -114,6 +115,15 @@ commandLoop h sa =
then commandLoop h sa
else return ()
+help_quit =
+ ("Terminate the program",
+ "")
+
+cmd_quit :: CommandHandler
+cmd_quit h sa args =
+ do sendReply h 211 "OK, Goodbye."
+ return False
+
help_help =
("Display help on available commands",
"When called without arguments, shows a summary of available system\n"
--
haskell-testpack
More information about the Pkg-haskell-commits
mailing list