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 cca6cfc327990abfc67a79853252649e05db0947 (commit)
from 3a1a6ca8c35d788bc5bdf13816882823c595188f (commit)
Summary of changes:
cbits/linger.c | 23 --------------------
snap-server.cabal | 3 --
.../Server/{LibevBackend.hsc => LibevBackend.hs} | 0
.../Server/{SimpleBackend.hsc => SimpleBackend.hs} | 14 ------------
test/snap-server-testsuite.cabal | 6 -----
5 files changed, 0 insertions(+), 46 deletions(-)
delete mode 100644 cbits/linger.c
rename src/Snap/Internal/Http/Server/{LibevBackend.hsc => LibevBackend.hs}
(100%)
rename src/Snap/Internal/Http/Server/{SimpleBackend.hsc => SimpleBackend.hs}
(95%)
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 cca6cfc327990abfc67a79853252649e05db0947
Author: Gregory Collins <[email protected]>
Date: Tue May 25 20:51:34 2010 -0400
Throw out some dodgy C stuff
diff --git a/cbits/linger.c b/cbits/linger.c
deleted file mode 100644
index 2186b33..0000000
--- a/cbits/linger.c
+++ /dev/null
@@ -1,23 +0,0 @@
-#include <sys/socket.h>
-#include <sys/time.h>
-
-
-void set_linger(int fd) {
- struct linger linger;
-
- /* five seconds of linger */
- linger.l_onoff = 1;
- linger.l_linger = 5;
-
- setsockopt(fd, SOL_SOCKET, SO_LINGER, &linger, sizeof(linger));
-}
-
-
-void set_fd_timeout(int fd) {
- struct timeval timeout;
- timeout.tv_sec = 10;
- timeout.tv_usec = 0;
-
- setsockopt(fd, SOL_SOCKET, SO_SNDTIMEO, &timeout, sizeof(timeout));
- setsockopt(fd, SOL_SOCKET, SO_RCVTIMEO, &timeout, sizeof(timeout));
-}
diff --git a/snap-server.cabal b/snap-server.cabal
index 141c924..b0ad452 100644
--- a/snap-server.cabal
+++ b/snap-server.cabal
@@ -76,9 +76,6 @@ Flag libev
Library
hs-source-dirs: src
- c-sources: cbits/linger.c
- include-dirs: cbits
-
exposed-modules:
Snap.Http.Server,
Snap.Http.Server.Config,
diff --git a/src/Snap/Internal/Http/Server/LibevBackend.hsc
b/src/Snap/Internal/Http/Server/LibevBackend.hs
similarity index 100%
rename from src/Snap/Internal/Http/Server/LibevBackend.hsc
rename to src/Snap/Internal/Http/Server/LibevBackend.hs
diff --git a/src/Snap/Internal/Http/Server/SimpleBackend.hsc
b/src/Snap/Internal/Http/Server/SimpleBackend.hs
similarity index 95%
rename from src/Snap/Internal/Http/Server/SimpleBackend.hsc
rename to src/Snap/Internal/Http/Server/SimpleBackend.hs
index 09b73c0..c42c808 100644
--- a/src/Snap/Internal/Http/Server/SimpleBackend.hsc
+++ b/src/Snap/Internal/Http/Server/SimpleBackend.hs
@@ -33,10 +33,7 @@ import Data.ByteString.Internal (c2w, w2c)
import qualified Data.ByteString as B
import Data.Iteratee.WrappedByteString
import Data.Typeable
-#ifdef LINUX
import Foreign hiding (new)
-#endif
-import Foreign.C.Types
import GHC.Conc (labelThread, forkOnIO)
import Network.Socket
import qualified Network.Socket.ByteString as SB
@@ -55,14 +52,6 @@ instance Show BackendTerminatedException where
instance Exception BackendTerminatedException
-
--- foreign import ccall unsafe "set_linger"
--- set_linger :: CInt -> IO ()
-
-foreign import ccall unsafe "set_fd_timeout"
- set_fd_timeout :: CInt -> IO ()
-
-
data Backend = Backend
{ _acceptSocket :: Socket }
@@ -125,9 +114,6 @@ withConnection (Backend asock) cpu proc = do
(sock,addr) <- accept asock
let fd = fdSocket sock
- -- set linger
- --set_linger fd
- set_fd_timeout fd
debug $ "Backend.withConnection: accepted connection"
debug $ "Backend.withConnection: remote: " ++ show addr
diff --git a/test/snap-server-testsuite.cabal b/test/snap-server-testsuite.cabal
index c21fc49..77e7169 100644
--- a/test/snap-server-testsuite.cabal
+++ b/test/snap-server-testsuite.cabal
@@ -11,9 +11,6 @@ Executable testsuite
hs-source-dirs: ../src suite
main-is: TestSuite.hs
- c-sources: ../cbits/linger.c
- include-dirs: ../cbits
-
build-depends:
QuickCheck >= 2,
array >= 0.3 && <0.4,
@@ -61,9 +58,6 @@ Executable pongserver
hs-source-dirs: ../src pongserver
main-is: Main.hs
- c-sources: ../cbits/linger.c
- include-dirs: ../cbits
-
build-depends:
QuickCheck >= 2,
array >= 0.3 && <0.4,
-----------------------------------------------------------------------
hooks/post-receive
--
snap-server
_______________________________________________
Snap mailing list
[email protected]
http://mailman-mail5.webfaction.com/listinfo/snap