Skip to content

Commit 78696e9

Browse files
committed
Merge #537
2 parents 09f30fa + 3a39953 commit 78696e9

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Network/Socket/Types.hsc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1151,7 +1151,9 @@ unixPathMax = #const sizeof(((struct sockaddr_un *)NULL)->sun_path)
11511151
pokeSockAddr :: Ptr a -> SockAddr -> IO ()
11521152
#if defined(DOMAIN_SOCKET_SUPPORT)
11531153
pokeSockAddr p sa@(SockAddrUnix path) = do
1154-
when (length path > unixPathMax) $ error "pokeSockAddr: path is too long"
1154+
when (length path > unixPathMax) $ error
1155+
$ "pokeSockAddr: path is too long in SockAddrUnix " <> show path
1156+
<> ", length " <> show (length path) <> ", unixPathMax " <> show unixPathMax
11551157
zeroMemory p $ fromIntegral $ sizeOfSockAddr sa
11561158
# if defined(HAVE_STRUCT_SOCKADDR_SA_LEN)
11571159
(#poke struct sockaddr_un, sun_len) p ((#const sizeof(struct sockaddr_un)) :: Word8)
@@ -1318,7 +1320,7 @@ socktypeBijection :: Bijection SocketType String
13181320
socktypeBijection =
13191321
[ (UnsupportedSocketType, "UnsupportedSocketType")
13201322
, (Stream, "Stream")
1321-
, (Datagram, "Datagram")
1323+
, (Datagram, "Datagram")
13221324
, (Raw, "Raw")
13231325
, (RDM, "RDM")
13241326
, (SeqPacket, "SeqPacket")

0 commit comments

Comments
 (0)