From: Paul Gofman pgofman@codeweavers.com
Signed-off-by: Paul Gofman pgofman@codeweavers.com --- dlls/winhttp/net.c | 7 +++++++ dlls/winhttp/request.c | 4 ++-- dlls/winhttp/winhttp_private.h | 1 + 3 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/dlls/winhttp/net.c b/dlls/winhttp/net.c index 17520a54f63..a17582c90a6 100644 --- a/dlls/winhttp/net.c +++ b/dlls/winhttp/net.c @@ -51,6 +51,13 @@ static int sock_send(int fd, const void *msg, size_t len, WSAOVERLAPPED *ovr) return -1; }
+BOOL netconn_wait_overlapped_result( struct netconn *conn, WSAOVERLAPPED *ovr, DWORD *len ) +{ + DWORD retflags; + + return WSAGetOverlappedResult( conn->socket, ovr, len, TRUE, &retflags ); +} + static int sock_recv(int fd, void *msg, size_t len, int flags) { int ret; diff --git a/dlls/winhttp/request.c b/dlls/winhttp/request.c index 2754dc29163..7fb582362aa 100644 --- a/dlls/winhttp/request.c +++ b/dlls/winhttp/request.c @@ -3336,9 +3336,9 @@ static DWORD send_frame( struct socket *socket, enum socket_opcode opcode, USHOR
static DWORD complete_send_frame( struct socket *socket, WSAOVERLAPPED *ovr, const char *buf ) { - DWORD ret, retflags, len, i; + DWORD ret, len, i;
- if (!WSAGetOverlappedResult( socket->request->netconn->socket, ovr, &len, TRUE, &retflags )) + if (!netconn_wait_overlapped_result( socket->request->netconn, ovr, &len )) return WSAGetLastError();
if (socket->bytes_in_send_frame_buffer) diff --git a/dlls/winhttp/winhttp_private.h b/dlls/winhttp/winhttp_private.h index 98e05f068ba..6c381af627f 100644 --- a/dlls/winhttp/winhttp_private.h +++ b/dlls/winhttp/winhttp_private.h @@ -371,6 +371,7 @@ DWORD netconn_recv( struct netconn *, void *, size_t, int, int * ) DECLSPEC_HIDD DWORD netconn_resolve( WCHAR *, INTERNET_PORT, struct sockaddr_storage *, int ) DECLSPEC_HIDDEN; DWORD netconn_secure_connect( struct netconn *, WCHAR *, DWORD, CredHandle *, BOOL ) DECLSPEC_HIDDEN; DWORD netconn_send( struct netconn *, const void *, size_t, int *, WSAOVERLAPPED * ) DECLSPEC_HIDDEN; +BOOL netconn_wait_overlapped_result( struct netconn *conn, WSAOVERLAPPED *ovr, DWORD *len ) DECLSPEC_HIDDEN; void netconn_cancel_io( struct netconn *conn ) DECLSPEC_HIDDEN; DWORD netconn_set_timeout( struct netconn *, BOOL, int ) DECLSPEC_HIDDEN; BOOL netconn_is_alive( struct netconn * ) DECLSPEC_HIDDEN;