packages feed

dbus 1.3.3 → 1.3.4

raw patch · 2 files changed

+6/−15 lines, 2 filesdep ~networkPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependency ranges changed: network

API changes (from Hackage documentation)

- DBus.Transport: instance Network.Socket.Types.SocketAddress DBus.Transport.NullSockAddr

Files

dbus.cabal view
@@ -1,5 +1,5 @@ name: dbus-version: 1.3.3+version: 1.3.4 license: Apache-2.0 license-file: license.txt author: John Millikin <john@john-millikin.com>@@ -90,7 +90,7 @@     , exceptions < 0.11     , filepath < 1.5     , lens < 5.3-    , network >= 3.1.2.1 && < 3.2+    , network >= 3.2 && < 3.3     , parsec < 3.2     , random < 1.3     , split < 0.3@@ -135,7 +135,7 @@     , directory < 1.4     , extra < 1.8     , filepath < 1.5-    , network >= 3.1.2.1 && < 3.2+    , network >= 3.2 && < 3.3     , parsec < 3.2     , process < 1.7     , QuickCheck < 2.16
lib/DBus/Transport.hs view
@@ -56,7 +56,7 @@ import           Foreign.Ptr (castPtr, plusPtr) import           Foreign.Storable (sizeOf) import           Network.Socket-import           Network.Socket.Address (SocketAddress(..))+import           Network.Socket.Internal (NullSockAddr(..)) import qualified Network.Socket.Address import           Network.Socket.ByteString (recvMsg) import qualified System.Info@@ -183,19 +183,10 @@     transportGetWithFds (SocketTransport addr s) n = catchIOException addr (recvWithFds s n)     transportClose (SocketTransport addr s) = catchIOException addr (close s) --- todo: import NullSockAddr from network package, when released--- (https://github.com/haskell/network/pull/562)-data NullSockAddr = NullSockAddr--instance SocketAddress NullSockAddr where-    sizeOfSocketAddress NullSockAddr = 0-    peekSocketAddress _ptr = return NullSockAddr-    pokeSocketAddress _ptr NullSockAddr = return ()- sendWithFds :: Socket -> ByteString -> [Fd] -> IO () sendWithFds s msg fds = loop 0 where     loop acc  = do-        let cmsgs = if acc == 0 then (encodeCmsg <$> fds) else []+        let cmsgs = if acc == 0 then (encodeCmsg . (pure :: Fd -> [Fd]) <$> fds) else []         n <- unsafeUseAsCString msg $ \cstr -> do             let buf = [(plusPtr (castPtr cstr) acc, len - acc)]             Network.Socket.Address.sendBufMsg s NullSockAddr buf cmsgs mempty@@ -512,7 +503,7 @@ -- from the network package in future (https://github.com/haskell/network/issues/566) decodeFdCmsg :: Cmsg -> Maybe [Fd] decodeFdCmsg (Cmsg cmsid (PS fptr off len))-  | cmsid /= CmsgIdFd = Nothing+  | cmsid /= CmsgIdFds = Nothing   | otherwise =     unsafeDupablePerformIO $ withForeignPtr fptr $ \p0 -> do       let p = castPtr (p0 `plusPtr` off)