Commit 699643c4 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

ws2_32: Return 32767 or 0 in the iMaxSockets field.

Depending on reported winsock version. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50352Signed-off-by: 's avatarZebediah Figura <zfigura@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent e078f698
......@@ -419,7 +419,6 @@ static BOOL socket_list_remove( SOCKET socket )
return FALSE;
}
#define MAX_SOCKETS_PER_PROCESS 128 /* reasonable guess */
#define MAX_UDP_DATAGRAM 1024
static INT WINAPI WSA_DefaultBlockingHook( FARPROC x );
......@@ -588,7 +587,7 @@ int WINAPI WSAStartup( WORD version, WSADATA *data )
data->wHighVersion = MAKEWORD(2, 2);
strcpy( data->szDescription, "WinSock 2.0" );
strcpy( data->szSystemStatus, "Running" );
data->iMaxSockets = MAX_SOCKETS_PER_PROCESS;
data->iMaxSockets = (LOBYTE(version) == 1 ? 32767 : 0);
data->iMaxUdpDg = MAX_UDP_DATAGRAM;
/* don't fill lpVendorInfo */
}
......
......@@ -2871,7 +2871,7 @@ static void test_startup(void)
ok(data.wHighVersion == 0x202, "got maximum version %#x\n", data.wHighVersion);
ok(!strcmp(data.szDescription, "WinSock 2.0"), "got description %s\n", debugstr_a(data.szDescription));
ok(!strcmp(data.szSystemStatus, "Running"), "got status %s\n", debugstr_a(data.szSystemStatus));
todo_wine ok(data.iMaxSockets == (LOBYTE(tests[i].version) == 1 ? 32767 : 0), "got maximum sockets %u\n", data.iMaxSockets);
ok(data.iMaxSockets == (LOBYTE(tests[i].version) == 1 ? 32767 : 0), "got maximum sockets %u\n", data.iMaxSockets);
todo_wine ok(data.iMaxUdpDg == (LOBYTE(tests[i].version) == 1 ? 65467 : 0), "got maximum datagram size %u\n", data.iMaxUdpDg);
WSASetLastError(0xdeadbeef);
......
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