diff options
author | joe <joe@jerkface.net> | 2013-10-08 17:53:44 -0400 |
---|---|---|
committer | joe <joe@jerkface.net> | 2013-10-08 17:53:44 -0400 |
commit | 2758e4597ad5fa02272a1500581345d1339d2d79 (patch) | |
tree | f860d55bece6c12136ac8abacdf3f3cd827b40d8 | |
parent | f98bf3c8449c234dff3fc0d2295c9485eb5c40c8 (diff) |
Handle address of LocalHost in peerAddr. Fixes local echo case.
-rw-r--r-- | Presence/XMPPTypes.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Presence/XMPPTypes.hs b/Presence/XMPPTypes.hs index 41ce07c2..06cfb563 100644 --- a/Presence/XMPPTypes.hs +++ b/Presence/XMPPTypes.hs | |||
@@ -239,7 +239,7 @@ parseAddressJID jid = do | |||
239 | 239 | ||
240 | peerAddr :: Peer -> SockAddr | 240 | peerAddr :: Peer -> SockAddr |
241 | peerAddr (RemotePeer addr) = addr | 241 | peerAddr (RemotePeer addr) = addr |
242 | -- peerAddr LocalHost = throw exception | 242 | peerAddr LocalHost = SockAddrInet6 0 (0 {- FlowInfo -}) (0,0,0,1) (0 {- ScopeID -}) |
243 | 243 | ||
244 | socketFamily (SockAddrInet _ _) = AF_INET | 244 | socketFamily (SockAddrInet _ _) = AF_INET |
245 | socketFamily (SockAddrInet6 _ _ _ _) = AF_INET6 | 245 | socketFamily (SockAddrInet6 _ _ _ _) = AF_INET6 |