diff options
author | Corentin Chary <corentin.chary@gmail.com> | 2011-06-10 10:24:23 +0200 |
---|---|---|
committer | Corentin Chary <corentin.chary@gmail.com> | 2011-06-10 17:36:19 +0200 |
commit | c9d7501d9f27573b6554faf496c9ec8565830a1e (patch) | |
tree | 4914f35832b4eeac2ac8d5c2c37b8ac05d0c2f83 | |
parent | 3203769827f559db150555275fe6f1d6e0278346 (diff) |
Flush the buffer when full (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) |