Commit e50df0fa authored by Paul Gofman's avatar Paul Gofman Committed by Alexandre Julliard

winhttp: Move flags to websocket header.

parent 64abcf80
......@@ -3263,6 +3263,7 @@ HINTERNET WINAPI WinHttpWebSocketCompleteUpgrade( HINTERNET hrequest, DWORD_PTR
socket->hdr.callback = request->hdr.callback;
socket->hdr.notify_mask = request->hdr.notify_mask;
socket->hdr.context = context;
socket->hdr.flags = request->connect->hdr.flags & WINHTTP_FLAG_ASYNC;
socket->keepalive_interval = 30000;
socket->send_buffer_size = request->websocket_send_buffer_size;
InitializeSRWLock( &socket->send_lock );
......@@ -3587,7 +3588,7 @@ DWORD WINAPI WinHttpWebSocketSend( HINTERNET hsocket, WINHTTP_WEB_SOCKET_BUFFER_
return ERROR_INVALID_OPERATION;
}
if (socket->request->connect->hdr.flags & WINHTTP_FLAG_ASYNC)
if (socket->hdr.flags & WINHTTP_FLAG_ASYNC)
{
BOOL async_send, complete_async = FALSE;
struct socket_send *s;
......@@ -3762,7 +3763,7 @@ static void task_socket_send_pong( void *ctx, BOOL abort )
static DWORD socket_send_pong( struct socket *socket )
{
if (socket->request->connect->hdr.flags & WINHTTP_FLAG_ASYNC)
if (socket->hdr.flags & WINHTTP_FLAG_ASYNC)
{
BOOL async_send, complete_async = FALSE;
struct socket_send *s;
......@@ -4024,7 +4025,7 @@ DWORD WINAPI WinHttpWebSocketReceive( HINTERNET hsocket, void *buf, DWORD len, D
return ERROR_INVALID_OPERATION;
}
if (socket->request->connect->hdr.flags & WINHTTP_FLAG_ASYNC)
if (socket->hdr.flags & WINHTTP_FLAG_ASYNC)
{
struct socket_receive *r;
......@@ -4094,7 +4095,7 @@ static DWORD send_socket_shutdown( struct socket *socket, USHORT status, const v
if (socket->state < SOCKET_STATE_SHUTDOWN) socket->state = SOCKET_STATE_SHUTDOWN;
if (socket->request->connect->hdr.flags & WINHTTP_FLAG_ASYNC)
if (socket->hdr.flags & WINHTTP_FLAG_ASYNC)
{
BOOL async_send, complete_async = FALSE;
struct socket_shutdown *s;
......@@ -4252,7 +4253,7 @@ DWORD WINAPI WinHttpWebSocketClose( HINTERNET hsocket, USHORT status, void *reas
prev_state = socket->state;
socket->state = SOCKET_STATE_CLOSED;
if (socket->request->connect->hdr.flags & WINHTTP_FLAG_ASYNC)
if (socket->hdr.flags & WINHTTP_FLAG_ASYNC)
{
pending_receives = InterlockedIncrement( &socket->hdr.pending_receives );
cancel_queue( &socket->recv_q );
......@@ -4263,12 +4264,12 @@ DWORD WINAPI WinHttpWebSocketClose( HINTERNET hsocket, USHORT status, void *reas
if (pending_receives == 1 && socket->close_frame_received)
{
if (socket->request->connect->hdr.flags & WINHTTP_FLAG_ASYNC)
if (socket->hdr.flags & WINHTTP_FLAG_ASYNC)
socket_close_complete( socket, socket->close_frame_receive_err );
goto done;
}
if (socket->request->connect->hdr.flags & WINHTTP_FLAG_ASYNC)
if (socket->hdr.flags & WINHTTP_FLAG_ASYNC)
{
struct socket_shutdown *s;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment