diff options
author | Corentin Chary <corentin.chary@gmail.com> | 2011-06-10 10:24:23 +0200 |
---|---|---|
committer | Kristian Høgsberg <krh@bitplanet.net> | 2011-06-11 17:32:25 -0400 |
commit | d8f2e5d6ab0205141e3d6c41b815cd8029bb2911 (patch) | |
tree | 3bc76f699f4ce23a7ff83673693b86b8892084fd | |
parent | d7569d46c57adb44472f52c9d1392e1b4720c4e8 (diff) |
Flush the protocol output buffer when it fills up
Original patch from bnf.
Signed-off-by: Corentin Chary <corentin.chary@gmail.com>
-rw-r--r-- | wayland/connection.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/wayland/connection.c b/wayland/connection.c index e5893c3..0f2051a 100644 --- a/wayland/connection.c +++ b/wayland/connection.c @@ -327,6 +327,10 @@ void wl_connection_write(struct wl_connection *connection, const void *data, size_t count) { + if (connection->out.head - connection->out.tail + + count > ARRAY_LENGTH(connection->out.data)) + wl_connection_data(connection, WL_CONNECTION_WRITABLE); + wl_buffer_put(&connection->out, data, count); if (connection->out.head - connection->out.tail == count) |