aboutsummaryrefslogtreecommitdiff
path: root/seatd/seat.c
diff options
context:
space:
mode:
authorKenny Levinsen <kl@kl.wtf>2020-08-04 01:43:24 +0200
committerKenny Levinsen <kl@kl.wtf>2020-08-04 01:43:24 +0200
commitdb36f0dfe863e2fe20bcb4e8ef4ba06579ab2e53 (patch)
tree63dd4e3d03cf25a8478e2d1a7f6823ce56141e5f /seatd/seat.c
parenta8204ebceac760519d8653a10fedad6f21e8c11c (diff)
client: Sanitize shutdown/kill mechanism
Diffstat (limited to 'seatd/seat.c')
-rw-r--r--seatd/seat.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/seatd/seat.c b/seatd/seat.c
index 8650e2b..37f2b00 100644
--- a/seatd/seat.c
+++ b/seatd/seat.c
@@ -40,7 +40,7 @@ void seat_destroy(struct seat *seat) {
while (!linked_list_empty(&seat->clients)) {
struct client *client = (struct client *)seat->clients.next;
// This will cause the client to remove itself from the seat
- assert(client->seat);
+ assert(client->seat == seat);
client_kill(client);
}
assert(seat->curttyfd == -1);
@@ -367,7 +367,7 @@ int seat_open_client(struct seat *seat, struct client *client) {
seat->active_client = client;
if (client_send_enable_seat(client) == -1) {
- seat_remove_client(client);
+ log_error("could not send enable signal");
return -1;
}
@@ -428,7 +428,7 @@ static int seat_disable_client(struct client *client) {
client->pending_disable = true;
if (client_send_disable_seat(seat->active_client) == -1) {
- seat_remove_client(client);
+ log_error("could not send disable event");
return -1;
}