ws2_32: Advertise protocol entries as default.

This commit is contained in:
Bruno Jesus 2013-09-16 01:43:31 -03:00 committed by Alexandre Julliard
parent f9c76be084
commit e0581b38a7
2 changed files with 7 additions and 2 deletions

View File

@ -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;

View File

@ -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