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
92426b51
Commit
92426b51
authored
Nov 01, 2013
by
Jacek Caban
Committed by
Alexandre Julliard
Nov 01, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winhttp: Use netconn_query_data_available in get_available_data when possible.
parent
cd5d1e54
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
16 deletions
+15
-16
net.c
dlls/winhttp/net.c
+13
-14
request.c
dlls/winhttp/request.c
+1
-1
winhttp_private.h
dlls/winhttp/winhttp_private.h
+1
-1
No files found.
dlls/winhttp/net.c
View file @
92426b51
...
...
@@ -712,24 +712,23 @@ BOOL netconn_recv( netconn_t *conn, void *buf, size_t len, int flags, int *recvd
return
TRUE
;
}
BOOL
netconn_query_data_available
(
netconn_t
*
conn
,
DWORD
*
available
)
ULONG
netconn_query_data_available
(
netconn_t
*
conn
)
{
#ifdef FIONREAD
int
ret
;
ULONG
unread
;
#endif
*
available
=
0
;
if
(
!
netconn_connected
(
conn
))
return
FALSE
;
if
(
!
netconn_connected
(
conn
))
return
0
;
if
(
conn
->
secure
)
{
*
available
=
conn
->
peek_len
;
return
TRUE
;
}
if
(
conn
->
secure
)
{
return
conn
->
peek_len
;
}
else
{
#ifdef FIONREAD
if
(
!
(
ret
=
ioctlsocket
(
conn
->
socket
,
FIONREAD
,
&
unread
)))
*
available
=
unread
;
ULONG
unread
;
if
(
!
ioctlsocket
(
conn
->
socket
,
FIONREAD
,
&
unread
))
return
unread
;
#endif
return
TRUE
;
}
return
0
;
}
DWORD
netconn_set_timeout
(
netconn_t
*
netconn
,
BOOL
send
,
int
value
)
...
...
dlls/winhttp/request.c
View file @
92426b51
...
...
@@ -1955,7 +1955,7 @@ static BOOL start_next_chunk( request_t *request, BOOL notify )
static
DWORD
get_available_data
(
request_t
*
request
)
{
if
(
request
->
read_chunked
)
return
min
(
request
->
read_chunked_size
,
request
->
read_size
);
return
request
->
read_size
;
return
request
->
read_size
+
netconn_query_data_available
(
&
request
->
netconn
)
;
}
/* check if we have reached the end of the data to read */
...
...
dlls/winhttp/winhttp_private.h
View file @
92426b51
...
...
@@ -266,7 +266,7 @@ BOOL netconn_connected( netconn_t * ) DECLSPEC_HIDDEN;
BOOL
netconn_create
(
netconn_t
*
,
int
,
int
,
int
)
DECLSPEC_HIDDEN
;
BOOL
netconn_init
(
netconn_t
*
)
DECLSPEC_HIDDEN
;
void
netconn_unload
(
void
)
DECLSPEC_HIDDEN
;
BOOL
netconn_query_data_available
(
netconn_t
*
,
DWORD
*
)
DECLSPEC_HIDDEN
;
ULONG
netconn_query_data_available
(
netconn_t
*
)
DECLSPEC_HIDDEN
;
BOOL
netconn_recv
(
netconn_t
*
,
void
*
,
size_t
,
int
,
int
*
)
DECLSPEC_HIDDEN
;
BOOL
netconn_resolve
(
WCHAR
*
,
INTERNET_PORT
,
struct
sockaddr
*
,
socklen_t
*
,
int
)
DECLSPEC_HIDDEN
;
BOOL
netconn_secure_connect
(
netconn_t
*
,
WCHAR
*
)
DECLSPEC_HIDDEN
;
...
...
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