[1/5] ws2_32: Advertise protocol entries as default
Bruno Jesus
00cpxxx at gmail.com
Sun Sep 15 23:43:31 CDT 2013
Required to later fix the case socket(0,0,IPPROTO_xxx) which currently fails.
-------------- next part --------------
---
dlls/ws2_32/socket.c | 5 +++++
dlls/ws2_32/tests/sock.c | 2 +-
2 files changed, 6 insertions(+), 1 deletion(-)
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..1b5715f 100644
--- a/dlls/ws2_32/tests/sock.c
+++ b/dlls/ws2_32/tests/sock.c
@@ -2014,8 +2014,8 @@ todo_wine {
break;
}
}
- ok(i != items, "Creating a socket without protocol and socket type didn't work\n");
}
+ 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
--
1.8.3.2
More information about the wine-patches
mailing list