summaryrefslogtreecommitdiff
path: root/dht/Presence/XMPPServer.hs
diff options
context:
space:
mode:
authorJames Crayne <jim.crayne@gmail.com>2019-10-16 07:58:55 +0000
committerJoe Crayne <joe@jerkface.net>2020-01-01 19:40:59 -0500
commit6894ac341a4e5691c72346bde9a26457d4e70460 (patch)
tree7ee2bf4b55b053bdbadfe65ad419e5f3199b4a76 /dht/Presence/XMPPServer.hs
parentc4dcf8374e218e741f4c3120d889c420d8ca2edb (diff)
Successful builds against newer network package
Built against both network-3.0.1.0 and network-3.1.0.0 Note, due to upstream issue, getting network-bsd-2.8.1.0 to cooperate with network-3.0.1.0 requires a little finessing. The network-bsd package expects a header(HsNetConfig.h) that network fails to provide. A simple work around is to copy the header after running a newer version of the network configure script from github. Similar for network-3.1.0.0, but this time the header is HsNetworkConfig.h.
Diffstat (limited to 'dht/Presence/XMPPServer.hs')
-rw-r--r--dht/Presence/XMPPServer.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/dht/Presence/XMPPServer.hs b/dht/Presence/XMPPServer.hs
index fe099fb8..e98b9a2e 100644
--- a/dht/Presence/XMPPServer.hs
+++ b/dht/Presence/XMPPServer.hs
@@ -1101,7 +1101,7 @@ peerKey :: SocketLike sock => Maybe SockAddr -> sock -> IO (PeerAddress,Connecti
1101peerKey bind_addr sock = do 1101peerKey bind_addr sock = do
1102 laddr <- getSocketName sock 1102 laddr <- getSocketName sock
1103 raddr <- 1103 raddr <-
1104 sIsConnected sock >>= \c -> 1104 isValidSocket sock >>= \(sock,c) ->
1105 if c then getPeerName sock -- addr is normally socketName 1105 if c then getPeerName sock -- addr is normally socketName
1106 else return laddr -- Weird hack: addr is would-be peer name 1106 else return laddr -- Weird hack: addr is would-be peer name
1107 -- Assume remote peers are listening on the same port that we do. 1107 -- Assume remote peers are listening on the same port that we do.