Commit e0581b38 authored by Bruno Jesus's avatar Bruno Jesus Committed by Alexandre Julliard

ws2_32: Advertise protocol entries as default.

parent f9c76be0
...@@ -1613,6 +1613,7 @@ static INT WS_EnterSingleProtocolW( INT protocol, WSAPROTOCOL_INFOW* info ) ...@@ -1613,6 +1613,7 @@ static INT WS_EnterSingleProtocolW( INT protocol, WSAPROTOCOL_INFOW* info )
XP1_GUARANTEED_DELIVERY; XP1_GUARANTEED_DELIVERY;
info->ProviderId = ProviderIdIP; info->ProviderId = ProviderIdIP;
info->dwCatalogEntryId = 0x3e9; info->dwCatalogEntryId = 0x3e9;
info->dwProviderFlags = PFL_MATCHES_PROTOCOL_ZERO;
info->ProtocolChain.ChainLen = 1; info->ProtocolChain.ChainLen = 1;
info->iVersion = 2; info->iVersion = 2;
info->iAddressFamily = WS_AF_INET; info->iAddressFamily = WS_AF_INET;
...@@ -1628,6 +1629,7 @@ static INT WS_EnterSingleProtocolW( INT protocol, WSAPROTOCOL_INFOW* info ) ...@@ -1628,6 +1629,7 @@ static INT WS_EnterSingleProtocolW( INT protocol, WSAPROTOCOL_INFOW* info )
XP1_CONNECTIONLESS; XP1_CONNECTIONLESS;
info->ProviderId = ProviderIdIP; info->ProviderId = ProviderIdIP;
info->dwCatalogEntryId = 0x3ea; info->dwCatalogEntryId = 0x3ea;
info->dwProviderFlags = PFL_MATCHES_PROTOCOL_ZERO;
info->ProtocolChain.ChainLen = 1; info->ProtocolChain.ChainLen = 1;
info->iVersion = 2; info->iVersion = 2;
info->iAddressFamily = WS_AF_INET; info->iAddressFamily = WS_AF_INET;
...@@ -1644,6 +1646,7 @@ static INT WS_EnterSingleProtocolW( INT protocol, WSAPROTOCOL_INFOW* info ) ...@@ -1644,6 +1646,7 @@ static INT WS_EnterSingleProtocolW( INT protocol, WSAPROTOCOL_INFOW* info )
XP1_CONNECTIONLESS; XP1_CONNECTIONLESS;
info->ProviderId = ProviderIdIPX; info->ProviderId = ProviderIdIPX;
info->dwCatalogEntryId = 0x406; info->dwCatalogEntryId = 0x406;
info->dwProviderFlags = PFL_MATCHES_PROTOCOL_ZERO;
info->ProtocolChain.ChainLen = 1; info->ProtocolChain.ChainLen = 1;
info->iVersion = 2; info->iVersion = 2;
info->iAddressFamily = WS_AF_IPX; info->iAddressFamily = WS_AF_IPX;
...@@ -1661,6 +1664,7 @@ static INT WS_EnterSingleProtocolW( INT protocol, WSAPROTOCOL_INFOW* info ) ...@@ -1661,6 +1664,7 @@ static INT WS_EnterSingleProtocolW( INT protocol, WSAPROTOCOL_INFOW* info )
XP1_GUARANTEED_DELIVERY; XP1_GUARANTEED_DELIVERY;
info->ProviderId = ProviderIdSPX; info->ProviderId = ProviderIdSPX;
info->dwCatalogEntryId = 0x407; info->dwCatalogEntryId = 0x407;
info->dwProviderFlags = PFL_MATCHES_PROTOCOL_ZERO;
info->ProtocolChain.ChainLen = 1; info->ProtocolChain.ChainLen = 1;
info->iVersion = 2; info->iVersion = 2;
info->iAddressFamily = WS_AF_IPX; info->iAddressFamily = WS_AF_IPX;
...@@ -1677,6 +1681,7 @@ static INT WS_EnterSingleProtocolW( INT protocol, WSAPROTOCOL_INFOW* info ) ...@@ -1677,6 +1681,7 @@ static INT WS_EnterSingleProtocolW( INT protocol, WSAPROTOCOL_INFOW* info )
XP1_GUARANTEED_ORDER | XP1_GUARANTEED_DELIVERY; XP1_GUARANTEED_ORDER | XP1_GUARANTEED_DELIVERY;
info->ProviderId = ProviderIdSPX; info->ProviderId = ProviderIdSPX;
info->dwCatalogEntryId = 0x409; info->dwCatalogEntryId = 0x409;
info->dwProviderFlags = PFL_MATCHES_PROTOCOL_ZERO;
info->ProtocolChain.ChainLen = 1; info->ProtocolChain.ChainLen = 1;
info->iVersion = 2; info->iVersion = 2;
info->iAddressFamily = WS_AF_IPX; info->iAddressFamily = WS_AF_IPX;
......
...@@ -2000,22 +2000,22 @@ todo_wine ...@@ -2000,22 +2000,22 @@ todo_wine
ok(sock != INVALID_SOCKET, "Failed to create socket: %d\n", ok(sock != INVALID_SOCKET, "Failed to create socket: %d\n",
WSAGetLastError()); WSAGetLastError());
todo_wine {
size = sizeof(socktype); size = sizeof(socktype);
socktype = 0xdead; socktype = 0xdead;
err = getsockopt(sock, SOL_SOCKET, SO_TYPE, (char *) &socktype, &size); err = getsockopt(sock, SOL_SOCKET, SO_TYPE, (char *) &socktype, &size);
todo_wine
ok(!err, "getsockopt failed with %d\n", WSAGetLastError()); ok(!err, "getsockopt failed with %d\n", WSAGetLastError());
for(i = 0; i < items; i++) for(i = 0; i < items; i++)
{ {
if(pi[i].dwProviderFlags & PFL_MATCHES_PROTOCOL_ZERO) if(pi[i].dwProviderFlags & PFL_MATCHES_PROTOCOL_ZERO)
{ {
todo_wine
ok(socktype == pi[i].iSocketType, "Wrong socket type, expected %d received %d\n", ok(socktype == pi[i].iSocketType, "Wrong socket type, expected %d received %d\n",
pi[i].iSocketType, socktype); pi[i].iSocketType, socktype);
break; 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); closesocket(sock);
/* when no socket type is specified the first entry from WSAEnumProtocols /* when no socket type is specified the first entry from WSAEnumProtocols
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment