server: Calculate remaining data size after a closure is processed

When processing a closure, data in the connection can be consumed again
if the closure itself invokes extra event dispatch. In that case the
remaining data size is also altered, so the variable len should be
updated after the closure is processed.

Signed-off-by: Jaeyoon Jung <jaeyoon.jung@lge.com>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
This commit is contained in:
Jaeyoon Jung 2016-01-12 13:12:34 +09:00 committed by Derek Foreman
parent ee9b69cfe0
commit 0a37511ecc
3 changed files with 12 additions and 2 deletions

View file

@ -122,6 +122,9 @@ wl_connection_consume(struct wl_connection *connection, size_t size);
int
wl_connection_flush(struct wl_connection *connection);
uint32_t
wl_connection_pending_input(struct wl_connection *connection);
int
wl_connection_read(struct wl_connection *connection);