From: Kristian Høgsberg Date: Fri, 23 Mar 2012 04:27:04 +0000 (-0400) Subject: connection: Set n_fds_out to 0 when we send out the fds X-Git-Tag: 0.94.90~148 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cab70c9e5d8c38260a07bb1ddb7618826a120465;p=platform%2Fupstream%2Fwayland.git connection: Set n_fds_out to 0 when we send out the fds This needs to happen always, not just when the fd buffer overflows. --- diff --git a/src/connection.c b/src/connection.c index fa01545..ef8e3ae 100644 --- a/src/connection.c +++ b/src/connection.c @@ -287,6 +287,7 @@ wl_connection_data(struct wl_connection *connection, uint32_t mask) } close_fds(&connection->fds_out); + connection->n_fds_out = 0; connection->out.tail += len; if (connection->out.tail == connection->out.head && @@ -399,7 +400,6 @@ wl_connection_put_fd(struct wl_connection *connection, int32_t fd) if (connection->n_fds_out + 1 > MAX_FDS_OUT) { if (wl_connection_data(connection, WL_CONNECTION_WRITABLE)) return -1; - connection->n_fds_out = 0; } wl_buffer_put(&connection->fds_out, &fd, sizeof fd);