Module: wine Branch: master Commit: ae728cfa274e3517f38a9fe21c9b738c43b1ad73 URL: http://source.winehq.org/git/wine.git/?a=commit;h=ae728cfa274e3517f38a9fe21c...
Author: Bruno Jesus 00cpxxx@gmail.com Date: Fri Dec 27 18:32:29 2013 -0200
ws2_32: Add support to check if an IPX socket is bound.
---
dlls/ws2_32/socket.c | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c index 1d79b74..36f2ac4 100644 --- a/dlls/ws2_32/socket.c +++ b/dlls/ws2_32/socket.c @@ -1427,8 +1427,11 @@ static BOOL is_sockaddr_bound(const struct sockaddr *uaddr, int uaddrlen) { #ifdef HAS_IPX case AF_IPX: - FIXME("don't know how to tell if IPX socket is bound, assuming it is!\n"); - return TRUE; + { + static const struct sockaddr_ipx emptyAddr; + struct sockaddr_ipx *ipx = (struct sockaddr_ipx*) uaddr; + return ipx->sipx_port || ipx->sipx_network || memcmp(&ipx->sipx_node, &emptyAddr.sipx_node, sizeof(emptyAddr.sipx_node)); + } #endif case AF_INET6: {