mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-05-05 16:58:01 +02:00
backend-rdp: disconnect and free peers on compositor shutdown
Properly disconnect and free all RDP peers on compositor shutdown. This makes sure that all events are disabled, which should avoid any race conditions with pending events. Signed-off-by: Stefan Agner <stefan@agner.ch>
This commit is contained in:
parent
163f26f520
commit
edcab103da
1 changed files with 9 additions and 0 deletions
|
|
@ -663,8 +663,17 @@ rdp_destroy(struct weston_compositor *ec)
|
|||
{
|
||||
struct rdp_backend *b = to_rdp_backend(ec);
|
||||
struct weston_head *base, *next;
|
||||
struct rdp_peers_item *rdp_peer, *tmp;
|
||||
int i;
|
||||
|
||||
wl_list_for_each_safe(rdp_peer, tmp, &b->output->peers, link) {
|
||||
freerdp_peer* client = rdp_peer->peer;
|
||||
|
||||
client->Disconnect(client);
|
||||
freerdp_peer_context_free(client);
|
||||
freerdp_peer_free(client);
|
||||
}
|
||||
|
||||
for (i = 0; i < MAX_FREERDP_FDS; i++)
|
||||
if (b->listener_events[i])
|
||||
wl_event_source_remove(b->listener_events[i]);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue