[2/4] ws2_32: Add support to check if an IPX socket is bound

Bruno Jesus 00cpxxx at gmail.com
Fri Dec 27 14:32:29 CST 2013


-------------- next part --------------

---
 dlls/ws2_32/socket.c | 7 +++++--
 1 file 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:
         {
-- 
1.8.3.2


More information about the wine-patches mailing list