[Pkg-haskell-commits] darcs: haskell-network-multicast: Remove ad-hoc fix included in upstream version

Louis Bettens louis at bettens.info
Sun Aug 25 07:24:08 UTC 2013


Sun Aug 25 07:23:49 UTC 2013  Louis Bettens <louis at bettens.info>
  * Remove ad-hoc fix included in upstream version

    R ./patches/fix-multicastReceiver-socket-leak-when-unable-to-set-up-socket.diff
    R ./patches/
    M ./changelog -2 +1

Sun Aug 25 07:23:49 UTC 2013  Louis Bettens <louis at bettens.info>
  * Remove ad-hoc fix included in upstream version
diff -rN -u old-haskell-network-multicast/changelog new-haskell-network-multicast/changelog
--- old-haskell-network-multicast/changelog	2013-08-25 07:24:08.594534817 +0000
+++ new-haskell-network-multicast/changelog	2013-08-25 07:24:08.606535176 +0000
@@ -1,9 +1,8 @@
 haskell-network-multicast (0.0.8-1) UNRELEASED; urgency=low
 
   * Non-maintainer upload.
-  * Fix multicastReceiver socket leak when unable to set up socket.
-  * Closes: #720714, fixed and reported upstream by Joey Hess.
   * New upstream release
+  * Closes: #720714, fixed and reported upstream by Joey Hess.
 
  -- Louis Bettens <louis at bettens.info>  Sun, 25 Aug 2013 09:15:32 +0200
 
diff -rN -u old-haskell-network-multicast/patches/fix-multicastReceiver-socket-leak-when-unable-to-set-up-socket.diff new-haskell-network-multicast/patches/fix-multicastReceiver-socket-leak-when-unable-to-set-up-socket.diff
--- old-haskell-network-multicast/patches/fix-multicastReceiver-socket-leak-when-unable-to-set-up-socket.diff	2013-08-25 07:24:08.602534789 +0000
+++ new-haskell-network-multicast/patches/fix-multicastReceiver-socket-leak-when-unable-to-set-up-socket.diff	1970-01-01 00:00:00.000000000 +0000
@@ -1,49 +0,0 @@
-From: Joey Hess <joeyh at debian.org>
-Subject: fix multicastReceiver socket leak when unable to set up socket 
-
-Origin: upstream, https://github.com/audreyt/network-multicast/commit/0fae21bd7584dc80190c523e165c1b83a17da238
-diff --git a/src/Network/Multicast.hsc b/src/Network/Multicast.hsc
-index 5a87ed8..6876aab 100644
---- a/src/Network/Multicast.hsc
-+++ b/src/Network/Multicast.hsc
-@@ -30,6 +30,7 @@ import Foreign.C.Error
- import Foreign.Storable
- import Foreign.Marshal
- import Foreign.Ptr
-+import Control.Exception (bracketOnError)
- 
- type TimeToLive = Int
- type LoopbackMode = Bool
-@@ -72,18 +73,22 @@ multicastSender host port = do
- -- >         print (msg, addr) in loop
- --
- multicastReceiver :: HostName -> PortNumber -> IO Socket
--multicastReceiver host port = do
--    proto <- getProtocolNumber "udp"
--    sock  <- socket AF_INET Datagram proto
--#ifdef SO_REUSEPORT
--    setSocketOption sock ReusePort 1
-+multicastReceiver host port = bracketOnError get close setup
-+  where
-+    get = do
-+      proto <- getProtocolNumber "udp"
-+      sock  <- socket AF_INET Datagram proto
-+#if defined(SO_REUSEPORT) && ! defined (__linux__)
-+      setSocketOption sock ReusePort 1
- #else
--    setSocketOption sock ReuseAddr 1
-+      setSocketOption sock ReuseAddr 1
-+      return sock
- #endif
--    (addrInfo:_) <- getAddrInfo Nothing (Just host) (Just $ show port)
--    bindSocket sock $ addrAddress addrInfo
--    addMembership sock host
--    return sock
-+    setup sock = do
-+      (addrInfo:_) <- getAddrInfo Nothing (Just host) (Just $ show port)
-+      bindSocket sock $ addrAddress addrInfo
-+      addMembership sock host
-+      return sock
- 
- doSetSocketOption :: Storable a => CInt -> Socket -> a -> IO CInt
- doSetSocketOption ip_multicast_option (MkSocket s _ _ _ _) x = alloca $ \ptr -> do




More information about the Pkg-haskell-commits mailing list