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
53f8d78e
Commit
53f8d78e
authored
Jun 15, 2014
by
Bruno Jesus
Committed by
Alexandre Julliard
Jun 17, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winhttp: Use a helper to receive data and take care of EINTR.
parent
6db935a6
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
4 deletions
+15
-4
net.c
dlls/winhttp/net.c
+15
-4
No files found.
dlls/winhttp/net.c
View file @
53f8d78e
...
...
@@ -150,6 +150,17 @@ static int sock_send(int fd, const void *msg, size_t len, int flags)
return
ret
;
}
static
int
sock_recv
(
int
fd
,
void
*
msg
,
size_t
len
,
int
flags
)
{
int
ret
;
do
{
ret
=
recv
(
fd
,
msg
,
len
,
flags
);
}
while
(
ret
==
-
1
&&
errno
==
EINTR
);
return
ret
;
}
static
DWORD
netconn_verify_cert
(
PCCERT_CONTEXT
cert
,
WCHAR
*
server
,
DWORD
security_flags
)
{
HCERTSTORE
store
=
cert
->
hCertStore
;
...
...
@@ -453,7 +464,7 @@ BOOL netconn_secure_connect( netconn_t *conn, WCHAR *hostname )
read_buf_size
+=
1024
;
}
size
=
recv
(
conn
->
socket
,
read_buf
+
in_bufs
[
0
].
cbBuffer
,
read_buf_size
-
in_bufs
[
0
].
cbBuffer
,
0
);
size
=
sock_
recv
(
conn
->
socket
,
read_buf
+
in_bufs
[
0
].
cbBuffer
,
read_buf_size
-
in_bufs
[
0
].
cbBuffer
,
0
);
if
(
size
<
1
)
{
WARN
(
"recv error
\n
"
);
status
=
ERROR_WINHTTP_SECURE_CHANNEL_ERROR
;
...
...
@@ -591,7 +602,7 @@ static BOOL read_ssl_chunk(netconn_t *conn, void *buf, SIZE_T buf_size, SIZE_T *
heap_free
(
conn
->
extra_buf
);
conn
->
extra_buf
=
NULL
;
}
else
{
buf_len
=
recv
(
conn
->
socket
,
conn
->
ssl_buf
+
conn
->
extra_len
,
ssl_buf_size
-
conn
->
extra_len
,
0
);
buf_len
=
sock_
recv
(
conn
->
socket
,
conn
->
ssl_buf
+
conn
->
extra_len
,
ssl_buf_size
-
conn
->
extra_len
,
0
);
if
(
buf_len
<
0
)
{
WARN
(
"recv failed
\n
"
);
return
FALSE
;
...
...
@@ -623,7 +634,7 @@ static BOOL read_ssl_chunk(netconn_t *conn, void *buf, SIZE_T buf_size, SIZE_T *
case
SEC_E_INCOMPLETE_MESSAGE
:
assert
(
buf_len
<
ssl_buf_size
);
size
=
recv
(
conn
->
socket
,
conn
->
ssl_buf
+
buf_len
,
ssl_buf_size
-
buf_len
,
0
);
size
=
sock_
recv
(
conn
->
socket
,
conn
->
ssl_buf
+
buf_len
,
ssl_buf_size
-
buf_len
,
0
);
if
(
size
<
1
)
return
FALSE
;
...
...
@@ -716,7 +727,7 @@ BOOL netconn_recv( netconn_t *conn, void *buf, size_t len, int flags, int *recvd
*
recvd
=
size
;
return
TRUE
;
}
if
((
*
recvd
=
recv
(
conn
->
socket
,
buf
,
len
,
flags
))
==
-
1
)
if
((
*
recvd
=
sock_
recv
(
conn
->
socket
,
buf
,
len
,
flags
))
==
-
1
)
{
set_last_error
(
sock_get_error
(
errno
)
);
return
FALSE
;
...
...
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