This is needed for mod.io integration in game "The Entropy Centre". Without support for this option the game hangs when trying to authenticate.
Please note that i do not know how Wine works, and have very little understanding of what i am doing. I copied and adjusted code from `connect_query_option()` in the same file. The game does work with this patch though.
-- v2: winhttp: Avoid unnecessary cast in connect_query_option(). winhttp: Support WINHTTP_OPTION_PARENT_HANDLE in request_query_option().
From: Vova Mshanetskiy vovams163@gmail.com
--- dlls/winhttp/session.c | 8 ++++++++ 1 file changed, 8 insertions(+)
diff --git a/dlls/winhttp/session.c b/dlls/winhttp/session.c index 6b426bee220..69320bf8ee7 100644 --- a/dlls/winhttp/session.c +++ b/dlls/winhttp/session.c @@ -737,6 +737,14 @@ static BOOL request_query_option( struct object_header *hdr, DWORD option, void
switch (option) { + case WINHTTP_OPTION_PARENT_HANDLE: + { + if (!validate_buffer( buffer, buflen, sizeof(HINTERNET) )) return FALSE; + + *(HINTERNET *)buffer = request->connect->hdr.handle; + *buflen = sizeof(HINTERNET); + return TRUE; + } case WINHTTP_OPTION_SECURITY_FLAGS: { DWORD flags;
From: Vova Mshanetskiy vovams163@gmail.com
--- dlls/winhttp/session.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/winhttp/session.c b/dlls/winhttp/session.c index 69320bf8ee7..978bf28bc37 100644 --- a/dlls/winhttp/session.c +++ b/dlls/winhttp/session.c @@ -383,7 +383,7 @@ static BOOL connect_query_option( struct object_header *hdr, DWORD option, void { if (!validate_buffer( buffer, buflen, sizeof(HINTERNET) )) return FALSE;
- *(HINTERNET *)buffer = ((struct object_header *)connect->session)->handle; + *(HINTERNET *)buffer = connect->session->hdr.handle; *buflen = sizeof(HINTERNET); return TRUE; }
Hi,
It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated.
The tests also ran into some preexisting test failures. If you know how to fix them that would be helpful. See the TestBot job for the details:
The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=132159
Your paranoid android.
=== debian11 (32 bit report) ===
winhttp: notification.c:118: Test failed: 1161: expected status 0x8 got 0x200000 notification: Timeout
On Mon Apr 24 21:09:33 2023 +0000, Vova Mshanetskiy wrote:
changed this line in [version 2 of the diff](/wine/wine/-/merge_requests/2697/diffs?diff_id=43839&start_sha=93a9940e14218a22f2ad4da08663e6546a55c1c0#a727e8ebc9ec378a30933cc2ea5260a55a913d8a_744_744)
Oops, yeah, that was a strange way to access the first member of a structure. I probably should have tried to understand better what i was copying. :slight_smile:
now you need to squash both of those commits, and you should be good to go :)
This merge request was approved by Hans Leidekker.