mirror of
git://source.winehq.org/git/wine.git
synced 2024-07-22 01:24:10 +00:00
winhttp: Return default value for WINHTTP_OPTION_WORKER_THREAD_COUNT.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com> Signed-off-by: Hans Leidekker <hans@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
9759ed143a
commit
2934ce5cd4
|
@ -1224,6 +1224,15 @@ static BOOL query_option( struct object_header *hdr, DWORD option, void *buffer,
|
|||
|
||||
switch (option)
|
||||
{
|
||||
case WINHTTP_OPTION_WORKER_THREAD_COUNT:
|
||||
{
|
||||
FIXME( "WINHTTP_OPTION_WORKER_THREAD_COUNT semi-stub.\n" );
|
||||
if (!validate_buffer( buffer, buflen, sizeof(DWORD) )) return FALSE;
|
||||
|
||||
*(DWORD *)buffer = 0;
|
||||
*buflen = sizeof(DWORD);
|
||||
return TRUE;
|
||||
}
|
||||
case WINHTTP_OPTION_CONTEXT_VALUE:
|
||||
{
|
||||
if (!validate_buffer( buffer, buflen, sizeof(DWORD_PTR) )) return FALSE;
|
||||
|
|
|
@ -94,6 +94,15 @@ static void test_WinHttpQueryOption(void)
|
|||
ok( GetLastError() == ERROR_INSUFFICIENT_BUFFER, "expected ERROR_INSUFFICIENT_BUFFER, got %lu\n", GetLastError() );
|
||||
ok( size == 4, "expected 4, got %lu\n", size );
|
||||
|
||||
feature = 0xdeadbeef;
|
||||
size = sizeof(feature) + 1;
|
||||
SetLastError(0xdeadbeef);
|
||||
ret = WinHttpQueryOption(session, WINHTTP_OPTION_WORKER_THREAD_COUNT, &feature, &size);
|
||||
ok(ret, "failed to query option %lu\n", GetLastError());
|
||||
ok(GetLastError() == ERROR_SUCCESS, "got %lu\n", GetLastError());
|
||||
ok(size == sizeof(feature), "WinHttpQueryOption should set the size: %lu\n", size);
|
||||
ok(feature == 0, "got unexpected WINHTTP_OPTION_WORKER_THREAD_COUNT %#lx\n", feature);
|
||||
|
||||
feature = 0xdeadbeef;
|
||||
size = sizeof(feature) + 1;
|
||||
SetLastError(0xdeadbeef);
|
||||
|
@ -165,6 +174,24 @@ static void test_WinHttpQueryOption(void)
|
|||
goto done;
|
||||
}
|
||||
|
||||
feature = 0xdeadbeef;
|
||||
size = sizeof(feature);
|
||||
SetLastError(0xdeadbeef);
|
||||
ret = WinHttpQueryOption(connection, WINHTTP_OPTION_WORKER_THREAD_COUNT, &feature, &size);
|
||||
ok(ret, "query WINHTTP_OPTION_WORKER_THREAD_COUNT failed for a request\n");
|
||||
ok(GetLastError() == ERROR_SUCCESS, "got unexpected error %lu\n", GetLastError());
|
||||
ok(size == sizeof(feature), "WinHttpQueryOption should set the size: %lu\n", size);
|
||||
ok(feature == 0, "got unexpected WINHTTP_OPTION_WORKER_THREAD_COUNT %#lx\n", feature);
|
||||
|
||||
feature = 0xdeadbeef;
|
||||
size = sizeof(feature);
|
||||
SetLastError(0xdeadbeef);
|
||||
ret = WinHttpQueryOption(request, WINHTTP_OPTION_WORKER_THREAD_COUNT, &feature, &size);
|
||||
ok(ret, "query WINHTTP_OPTION_WORKER_THREAD_COUNT failed for a request\n");
|
||||
ok(GetLastError() == ERROR_SUCCESS, "got unexpected error %lu\n", GetLastError());
|
||||
ok(size == sizeof(feature), "WinHttpQueryOption should set the size: %lu\n", size);
|
||||
ok(feature == 0, "got unexpected WINHTTP_OPTION_WORKER_THREAD_COUNT %#lx\n", feature);
|
||||
|
||||
feature = 0xdeadbeef;
|
||||
size = sizeof(feature);
|
||||
SetLastError(0xdeadbeef);
|
||||
|
|
Loading…
Reference in a new issue