--- server/websocket.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/server/websocket.c b/server/websocket.c index 6a7a96b..fd2dbb2 100644 --- a/server/websocket.c +++ b/server/websocket.c @@ -195,15 +195,14 @@ static void websocket_clear_frame(websocket_frame_t *frame) } /* Extract a frame header of data from a set of data transmitted by - a WebSocket client. Returns bytes consumed if a frame - is available, otherwise returns 0 */ -static int websocket_get_frame_header(websocket_frame_t *frame) + a WebSocket client. */ +static void websocket_get_frame_header(websocket_frame_t *frame) { int fin; int used = 0; if (frame_bytes_needed(frame) > 0) - return 0; + return; fin = frame->header[0] & FIN_FLAG; frame->type = frame->header[0] & TYPE_MASK; @@ -221,13 +220,10 @@ static int websocket_get_frame_header(websocket_frame_t *frame) if (frame->masked) { memcpy(frame->mask, frame->header + used, 4); - used += 4; } frame->relayed = 0; frame->frame_ready = 1; - - return used; } static int relay_data(guint8* buf, size_t size, websocket_frame_t *frame) -- 2.7.4 _______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/spice-devel