mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2025-11-03 09:01:42 -05:00
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.
This commit is contained in:
parent
75480a1eeb
commit
cab70c9e5d
1 changed files with 1 additions and 1 deletions
|
|
@ -287,6 +287,7 @@ wl_connection_data(struct wl_connection *connection, uint32_t mask)
|
||||||
}
|
}
|
||||||
|
|
||||||
close_fds(&connection->fds_out);
|
close_fds(&connection->fds_out);
|
||||||
|
connection->n_fds_out = 0;
|
||||||
|
|
||||||
connection->out.tail += len;
|
connection->out.tail += len;
|
||||||
if (connection->out.tail == connection->out.head &&
|
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 (connection->n_fds_out + 1 > MAX_FDS_OUT) {
|
||||||
if (wl_connection_data(connection, WL_CONNECTION_WRITABLE))
|
if (wl_connection_data(connection, WL_CONNECTION_WRITABLE))
|
||||||
return -1;
|
return -1;
|
||||||
connection->n_fds_out = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
wl_buffer_put(&connection->fds_out, &fd, sizeof fd);
|
wl_buffer_put(&connection->fds_out, &fd, sizeof fd);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue