Bruno Jesus : ws2_32: Advertise protocol entries as default.
Module: wine Branch: master Commit: e0581b38a7edee6ba61f5b3559a68af82d7d1f21 URL: http://source.winehq.org/git/wine.git/?a=commit;h=e0581b38a7edee6ba61f5b3559... Author: Bruno Jesus <00cpxxx(a)gmail.com> Date: Mon Sep 16 01:43:31 2013 -0300 ws2_32: Advertise protocol entries as default. --- dlls/ws2_32/socket.c | 5 +++++ dlls/ws2_32/tests/sock.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c index eacc793..8762950 100644 --- a/dlls/ws2_32/socket.c +++ b/dlls/ws2_32/socket.c @@ -1613,6 +1613,7 @@ static INT WS_EnterSingleProtocolW( INT protocol, WSAPROTOCOL_INFOW* info ) XP1_GUARANTEED_DELIVERY; info->ProviderId = ProviderIdIP; info->dwCatalogEntryId = 0x3e9; + info->dwProviderFlags = PFL_MATCHES_PROTOCOL_ZERO; info->ProtocolChain.ChainLen = 1; info->iVersion = 2; info->iAddressFamily = WS_AF_INET; @@ -1628,6 +1629,7 @@ static INT WS_EnterSingleProtocolW( INT protocol, WSAPROTOCOL_INFOW* info ) XP1_CONNECTIONLESS; info->ProviderId = ProviderIdIP; info->dwCatalogEntryId = 0x3ea; + info->dwProviderFlags = PFL_MATCHES_PROTOCOL_ZERO; info->ProtocolChain.ChainLen = 1; info->iVersion = 2; info->iAddressFamily = WS_AF_INET; @@ -1644,6 +1646,7 @@ static INT WS_EnterSingleProtocolW( INT protocol, WSAPROTOCOL_INFOW* info ) XP1_CONNECTIONLESS; info->ProviderId = ProviderIdIPX; info->dwCatalogEntryId = 0x406; + info->dwProviderFlags = PFL_MATCHES_PROTOCOL_ZERO; info->ProtocolChain.ChainLen = 1; info->iVersion = 2; info->iAddressFamily = WS_AF_IPX; @@ -1661,6 +1664,7 @@ static INT WS_EnterSingleProtocolW( INT protocol, WSAPROTOCOL_INFOW* info ) XP1_GUARANTEED_DELIVERY; info->ProviderId = ProviderIdSPX; info->dwCatalogEntryId = 0x407; + info->dwProviderFlags = PFL_MATCHES_PROTOCOL_ZERO; info->ProtocolChain.ChainLen = 1; info->iVersion = 2; info->iAddressFamily = WS_AF_IPX; @@ -1677,6 +1681,7 @@ static INT WS_EnterSingleProtocolW( INT protocol, WSAPROTOCOL_INFOW* info ) XP1_GUARANTEED_ORDER | XP1_GUARANTEED_DELIVERY; info->ProviderId = ProviderIdSPX; info->dwCatalogEntryId = 0x409; + info->dwProviderFlags = PFL_MATCHES_PROTOCOL_ZERO; info->ProtocolChain.ChainLen = 1; info->iVersion = 2; info->iAddressFamily = WS_AF_IPX; diff --git a/dlls/ws2_32/tests/sock.c b/dlls/ws2_32/tests/sock.c index 3c3658f..bc2bd10 100644 --- a/dlls/ws2_32/tests/sock.c +++ b/dlls/ws2_32/tests/sock.c @@ -2000,22 +2000,22 @@ todo_wine ok(sock != INVALID_SOCKET, "Failed to create socket: %d\n", WSAGetLastError()); -todo_wine { size = sizeof(socktype); socktype = 0xdead; err = getsockopt(sock, SOL_SOCKET, SO_TYPE, (char *) &socktype, &size); +todo_wine ok(!err, "getsockopt failed with %d\n", WSAGetLastError()); for(i = 0; i < items; i++) { if(pi[i].dwProviderFlags & PFL_MATCHES_PROTOCOL_ZERO) { +todo_wine ok(socktype == pi[i].iSocketType, "Wrong socket type, expected %d received %d\n", pi[i].iSocketType, socktype); break; } } ok(i != items, "Creating a socket without protocol and socket type didn't work\n"); -} closesocket(sock); /* when no socket type is specified the first entry from WSAEnumProtocols
participants (1)
-
Alexandre Julliard