Module: wine Branch: master Commit: d9dd9023fd5793c93db29d738a8577122f6aff2a URL: https://source.winehq.org/git/wine.git/?a=commit;h=d9dd9023fd5793c93db29d738...
Author: Jacek Caban jacek@codeweavers.com Date: Thu May 3 17:14:21 2018 +0200
wininet: Allow INTERNET_OPTION_SETTINGS_CHANGED on all handle types.
Based on patch by Michael Müller.
Signed-off-by: Jacek Caban jacek@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/wininet/internet.c | 11 +++++------ dlls/wininet/tests/internet.c | 9 +++++++++ 2 files changed, 14 insertions(+), 6 deletions(-)
diff --git a/dlls/wininet/internet.c b/dlls/wininet/internet.c index 699962c..be02a50 100644 --- a/dlls/wininet/internet.c +++ b/dlls/wininet/internet.c @@ -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); }
/*********************************************************************** diff --git a/dlls/wininet/tests/internet.c b/dlls/wininet/tests/internet.c index 3201dd9..79282a1 100644 --- a/dlls/wininet/tests/internet.c +++ b/dlls/wininet/tests/internet.c @@ -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);