From 9b3b5fd0c0459ab91d715dab31c9d270ffb4364a Mon Sep 17 00:00:00 2001 From: Hans Leidekker Date: Tue, 12 Sep 2017 09:59:04 +0200 Subject: [PATCH] winhttp: Trace errors from send and recv. Signed-off-by: Hans Leidekker Signed-off-by: Alexandre Julliard --- dlls/winhttp/net.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/dlls/winhttp/net.c b/dlls/winhttp/net.c index c9aa6d48b27..5cce12758ba 100644 --- a/dlls/winhttp/net.c +++ b/dlls/winhttp/net.c @@ -144,7 +144,7 @@ static int sock_send(int fd, const void *msg, size_t len, int flags) int ret; do { - ret = send(fd, msg, len, flags); + if ((ret = send(fd, msg, len, flags)) == -1) WARN("send error %s\n", strerror(errno)); } while(ret == -1 && errno == EINTR); return ret; @@ -155,7 +155,7 @@ static int sock_recv(int fd, void *msg, size_t len, int flags) int ret; do { - ret = recv(fd, msg, len, flags); + if ((ret = recv(fd, msg, len, flags)) == -1) WARN("recv error %s\n", strerror(errno)); } while(ret == -1 && errno == EINTR); return ret; @@ -484,7 +484,6 @@ BOOL netconn_secure_connect( netconn_t *conn, WCHAR *hostname, DWORD security_fl 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; break; } @@ -620,10 +619,8 @@ static BOOL read_ssl_chunk(netconn_t *conn, void *buf, SIZE_T buf_size, SIZE_T * conn->extra_buf = NULL; }else { 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"); + if(buf_len < 0) return FALSE; - } if(!buf_len) { *eof = TRUE; -- 2.11.4.GIT