Commit d9dd9023 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

wininet: Allow INTERNET_OPTION_SETTINGS_CHANGED on all handle types.

Based on patch by Michael Müller. Signed-off-by: 's avatarJacek Caban <jacek@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent da186c3c
......@@ -2600,6 +2600,10 @@ BOOL WINAPI InternetQueryOptionA(HINTERNET hInternet, DWORD dwOption,
DWORD INET_SetOption(object_header_t *hdr, DWORD option, void *buf, DWORD size)
{
switch(option) {
case INTERNET_OPTION_SETTINGS_CHANGED:
FIXME("INTERNETOPTION_SETTINGS_CHANGED semi-stub\n");
collect_connections(COLLECT_CONNECTIONS);
return ERROR_SUCCESS;
case INTERNET_OPTION_CALLBACK:
WARN("Not settable option %u\n", option);
return ERROR_INTERNET_OPTION_NOT_SETTABLE;
......@@ -2652,11 +2656,6 @@ static DWORD set_global_option(DWORD option, void *buf, DWORD size)
connect_timeout = *(ULONG*)buf;
return ERROR_SUCCESS;
case INTERNET_OPTION_SETTINGS_CHANGED:
FIXME("INTERNETOPTION_SETTINGS_CHANGED semi-stub\n");
collect_connections(COLLECT_CONNECTIONS);
return ERROR_SUCCESS;
case INTERNET_OPTION_SUPPRESS_BEHAVIOR:
FIXME("INTERNET_OPTION_SUPPRESS_BEHAVIOR stub\n");
......@@ -2667,7 +2666,7 @@ static DWORD set_global_option(DWORD option, void *buf, DWORD size)
return ERROR_SUCCESS;
}
return ERROR_INTERNET_INVALID_OPTION;
return INET_SetOption(NULL, option, buf, size);
}
/***********************************************************************
......
......@@ -1165,6 +1165,15 @@ static void test_InternetSetOption(void)
ok(ret == FALSE, "InternetSetOption should've failed\n");
ok(GetLastError() == ERROR_INVALID_PARAMETER, "GetLastError() = %x\n", GetLastError());
ret = InternetSetOptionA(req, INTERNET_OPTION_SETTINGS_CHANGED, NULL, 0);
ok(ret == TRUE, "InternetSetOption should've succeeded\n");
ret = InternetSetOptionA(con, INTERNET_OPTION_SETTINGS_CHANGED, NULL, 0);
ok(ret == TRUE, "InternetSetOption should've succeeded\n");
ret = InternetSetOptionA(ses, INTERNET_OPTION_SETTINGS_CHANGED, NULL, 0);
ok(ret == TRUE, "InternetSetOption should've succeeded\n");
ret = InternetCloseHandle(req);
ok(ret == TRUE, "InternetCloseHandle failed: 0x%08x\n", GetLastError());
ret = InternetCloseHandle(con);
......
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