Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
c16bb071
Commit
c16bb071
authored
Jun 05, 2007
by
Rob Shearman
Committed by
Alexandre Julliard
Jun 06, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet: Send the correct callbacks during InternetReadFileExA calls.
parent
78577127
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
0 deletions
+23
-0
internet.c
dlls/wininet/internet.c
+11
-0
http.c
dlls/wininet/tests/http.c
+12
-0
No files found.
dlls/wininet/internet.c
View file @
c16bb071
...
...
@@ -1855,6 +1855,9 @@ BOOL WINAPI InternetReadFileExA(HINTERNET hFile, LPINTERNET_BUFFERSA lpBuffersOu
return
FALSE
;
}
INTERNET_SendCallback
(
lpwh
,
lpwh
->
dwContext
,
INTERNET_STATUS_RECEIVING_RESPONSE
,
NULL
,
0
);
/* FIXME: IRF_ASYNC may not be the right thing to test here;
* hIC->hdr.dwFlags & INTERNET_FLAG_ASYNC is probably better */
if
(
dwFlags
&
IRF_ASYNC
)
...
...
@@ -1887,6 +1890,14 @@ BOOL WINAPI InternetReadFileExA(HINTERNET hFile, LPINTERNET_BUFFERSA lpBuffersOu
lpBuffersOut
->
dwBufferLength
,
&
lpBuffersOut
->
dwBufferLength
,
!
(
dwFlags
&
IRF_NO_WAIT
),
FALSE
);
if
(
retval
)
{
DWORD
dwBytesReceived
=
lpBuffersOut
->
dwBufferLength
;
INTERNET_SendCallback
(
lpwh
,
lpwh
->
dwContext
,
INTERNET_STATUS_RESPONSE_RECEIVED
,
&
dwBytesReceived
,
sizeof
(
dwBytesReceived
));
}
WININET_Release
(
lpwh
);
TRACE
(
"-- %s (bytes read: %d)
\n
"
,
retval
?
"TRUE"
:
"FALSE"
,
lpBuffersOut
->
dwBufferLength
);
...
...
dlls/wininet/tests/http.c
View file @
c16bb071
...
...
@@ -34,6 +34,8 @@
#define TEST_URL "http://www.winehq.org/site/about"
static
HANDLE
hCompleteEvent
;
static
BOOL
bResponseReceived
;
static
BOOL
bReceivingResponse
;
static
INTERNET_STATUS_CALLBACK
(
WINAPI
*
pInternetSetStatusCallbackA
)(
HINTERNET
,
INTERNET_STATUS_CALLBACK
);
static
BOOL
(
WINAPI
*
pInternetTimeFromSystemTimeA
)(
CONST
SYSTEMTIME
*
,
DWORD
,
LPSTR
,
DWORD
);
...
...
@@ -93,6 +95,7 @@ static VOID WINAPI callback(
trace
(
"%04x:Callback %p 0x%lx INTERNET_STATUS_RECEIVING_RESPONSE %p %d
\n
"
,
GetCurrentThreadId
(),
hInternet
,
dwContext
,
lpvStatusInformation
,
dwStatusInformationLength
);
bReceivingResponse
=
TRUE
;
break
;
case
INTERNET_STATUS_RESPONSE_RECEIVED
:
ok
(
dwStatusInformationLength
==
sizeof
(
DWORD
),
...
...
@@ -101,6 +104,7 @@ static VOID WINAPI callback(
trace
(
"%04x:Callback %p 0x%lx INTERNET_STATUS_RESPONSE_RECEIVED 0x%x %d
\n
"
,
GetCurrentThreadId
(),
hInternet
,
dwContext
,
*
(
DWORD
*
)
lpvStatusInformation
,
dwStatusInformationLength
);
bResponseReceived
=
TRUE
;
break
;
case
INTERNET_STATUS_CTL_RESPONSE_RECEIVED
:
trace
(
"%04x:Callback %p 0x%lx INTERNET_STATUS_CTL_RESPONSE_RECEIVED %p %d
\n
"
,
...
...
@@ -413,13 +417,17 @@ static void InternetReadFileExA_test(int flags)
inetbuffers
.
dwOffsetHigh
=
1234
;
inetbuffers
.
dwOffsetLow
=
5678
;
bReceivingResponse
=
FALSE
;
bResponseReceived
=
FALSE
;
rc
=
InternetReadFileExA
(
hor
,
&
inetbuffers
,
IRF_ASYNC
|
IRF_USE_CONTEXT
,
0xcafebabe
);
if
(
!
rc
)
{
if
(
GetLastError
()
==
ERROR_IO_PENDING
)
{
trace
(
"InternetReadFileEx -> PENDING
\n
"
);
ok
(
bReceivingResponse
,
"INTERNET_STATUS_RECEIVING_RESPONSE should have been sent to callback function
\n
"
);
WaitForSingleObject
(
hCompleteEvent
,
INFINITE
);
ok
(
!
bResponseReceived
,
"INTERNET_STATUS_RESPONSE_RECEIVED should not have been sent to callback function
\n
"
);
}
else
{
...
...
@@ -428,7 +436,11 @@ static void InternetReadFileExA_test(int flags)
}
}
else
{
trace
(
"InternetReadFileEx -> SUCCEEDED
\n
"
);
ok
(
bReceivingResponse
,
"INTERNET_STATUS_RECEIVING_RESPONSE should have been sent to callback function
\n
"
);
ok
(
bResponseReceived
,
"INTERNET_STATUS_RESPONSE_RECEIVED should have been sent to callback function
\n
"
);
}
trace
(
"read %i bytes
\n
"
,
inetbuffers
.
dwBufferLength
);
((
char
*
)
inetbuffers
.
lpvBuffer
)[
inetbuffers
.
dwBufferLength
]
=
'\0'
;
...
...
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