Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
e1b88983
Commit
e1b88983
authored
May 16, 2008
by
Hans Leidekker
Committed by
Alexandre Julliard
May 19, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet: INTERNET_STATUS_REQUEST_COMPLETE callback must supply a handle.
parent
6021fa09
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
58 additions
and
1 deletion
+58
-1
http.c
dlls/wininet/http.c
+1
-1
http.c
dlls/wininet/tests/http.c
+57
-0
No files found.
dlls/wininet/http.c
View file @
e1b88983
...
...
@@ -3397,7 +3397,7 @@ lend:
/* TODO: send notification for P3P header */
iar
.
dwResult
=
(
DWORD
)
bSuccess
;
iar
.
dwResult
=
(
DWORD
_PTR
)
lpwhr
->
hdr
.
hInternet
;
iar
.
dwError
=
bSuccess
?
ERROR_SUCCESS
:
INTERNET_GetLastError
();
INTERNET_SendCallback
(
&
lpwhr
->
hdr
,
lpwhr
->
hdr
.
dwContext
,
...
...
dlls/wininet/tests/http.c
View file @
e1b88983
...
...
@@ -1801,6 +1801,62 @@ static void test_bogus_accept_types_array(void)
InternetCloseHandle
(
ses
);
}
struct
context
{
HANDLE
event
;
HINTERNET
req
;
};
static
void
WINAPI
cb
(
HINTERNET
handle
,
DWORD_PTR
context
,
DWORD
status
,
LPVOID
info
,
DWORD
size
)
{
trace
(
"%p 0x%08lx %u %p 0x%08x
\n
"
,
handle
,
context
,
status
,
info
,
size
);
if
(
status
==
INTERNET_STATUS_REQUEST_COMPLETE
)
{
INTERNET_ASYNC_RESULT
*
result
=
info
;
struct
context
*
ctx
=
(
struct
context
*
)
context
;
trace
(
"request handle: 0x%08lx
\n
"
,
result
->
dwResult
);
ctx
->
req
=
(
HINTERNET
)
result
->
dwResult
;
SetEvent
(
ctx
->
event
);
}
}
static
void
test_open_url_async
(
void
)
{
BOOL
ret
;
HINTERNET
ses
,
req
;
DWORD
size
;
struct
context
ctx
;
ULONG
type
;
ctx
.
req
=
NULL
;
ctx
.
event
=
CreateEvent
(
NULL
,
TRUE
,
FALSE
,
"Z:_home_hans_jaman-installer.exe_ev1"
);
ses
=
InternetOpen
(
"AdvancedInstaller"
,
0
,
NULL
,
NULL
,
INTERNET_FLAG_ASYNC
);
ok
(
ses
!=
NULL
,
"InternetOpen failed
\n
"
);
InternetSetStatusCallback
(
ses
,
cb
);
ResetEvent
(
ctx
.
event
);
req
=
InternetOpenUrl
(
ses
,
"http://www.winehq.org"
,
NULL
,
0
,
0
,
(
DWORD_PTR
)
&
ctx
);
ok
(
!
req
&&
GetLastError
()
==
ERROR_IO_PENDING
,
"InternetOpenUrl failed
\n
"
);
WaitForSingleObject
(
ctx
.
event
,
INFINITE
);
type
=
0
;
size
=
sizeof
(
type
);
ret
=
InternetQueryOption
(
ctx
.
req
,
INTERNET_OPTION_HANDLE_TYPE
,
&
type
,
&
size
);
ok
(
ret
,
"HttpQueryInfo failed: %u
\n
"
,
GetLastError
());
ok
(
type
==
INTERNET_HANDLE_TYPE_HTTP_REQUEST
,
"expected INTERNET_HANDLE_TYPE_HTTP_REQUEST, got %u
\n
"
,
type
);
CloseHandle
(
ctx
.
event
);
InternetCloseHandle
(
ctx
.
req
);
InternetCloseHandle
(
ses
);
}
#define STATUS_STRING(status) \
memcpy(status_string[status], #status, sizeof(CHAR) * \
(strlen(#status) < MAX_STATUS_NAME ? \
...
...
@@ -1877,4 +1933,5 @@ START_TEST(http)
test_http_connection
();
test_user_agent_header
();
test_bogus_accept_types_array
();
test_open_url_async
();
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment