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
01e7d128
Commit
01e7d128
authored
Sep 08, 2008
by
Hans Leidekker
Committed by
Alexandre Julliard
Sep 09, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winhttp: WinHttpQueryDataAvailable should do a blocking read if more data is expected.
Spotted by Henri Verbeet.
parent
6e6ffab6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
6 deletions
+21
-6
net.c
dlls/winhttp/net.c
+1
-5
request.c
dlls/winhttp/request.c
+20
-1
No files found.
dlls/winhttp/net.c
View file @
01e7d128
...
...
@@ -464,11 +464,7 @@ BOOL netconn_query_data_available( netconn_t *conn, DWORD *available )
return
TRUE
;
}
#ifdef FIONREAD
if
(
!
(
ret
=
ioctl
(
conn
->
socket
,
FIONREAD
,
&
unread
)))
{
TRACE
(
"%d bytes of queued, but unread data
\n
"
,
unread
);
*
available
+=
unread
;
}
if
(
!
(
ret
=
ioctl
(
conn
->
socket
,
FIONREAD
,
&
unread
)))
*
available
=
unread
;
#endif
return
TRUE
;
}
...
...
dlls/winhttp/request.c
View file @
01e7d128
...
...
@@ -1238,7 +1238,26 @@ static BOOL query_data( request_t *request, LPDWORD available, BOOL async )
BOOL
ret
;
DWORD
num_bytes
;
ret
=
netconn_query_data_available
(
&
request
->
netconn
,
&
num_bytes
);
if
((
ret
=
netconn_query_data_available
(
&
request
->
netconn
,
&
num_bytes
)))
{
if
(
request
->
content_read
<
request
->
content_length
)
{
if
(
!
num_bytes
)
{
char
buffer
[
4096
];
size_t
to_read
=
min
(
sizeof
(
buffer
),
request
->
content_length
-
request
->
content_read
);
ret
=
netconn_recv
(
&
request
->
netconn
,
buffer
,
to_read
,
MSG_PEEK
,
(
int
*
)
&
num_bytes
);
if
(
ret
&&
!
num_bytes
)
WARN
(
"expected more data to be available
\n
"
);
}
}
else
if
(
num_bytes
)
{
WARN
(
"extra data available %u
\n
"
,
num_bytes
);
ret
=
FALSE
;
}
}
TRACE
(
"%u bytes available
\n
"
,
num_bytes
);
if
(
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