aboutsummaryrefslogtreecommitdiff
path: root/kms/client
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2024-07-17 20:54:37 +0200
committerdec05eba <dec05eba@protonmail.com>2024-07-17 20:54:37 +0200
commit463c1d61f0f4cc3b02eebf69bedfde578a8ad128 (patch)
treebd90eb060b232c0da2ab8e3a018096b0379e7e67 /kms/client
parent05587796381dd2a3f341dcf92af34bf80b02e6e1 (diff)
Portal: make resizing not glitched, clear background on resize, proper handling of multithreaded plane fd
Diffstat (limited to 'kms/client')
-rw-r--r--kms/client/kms_client.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/kms/client/kms_client.c b/kms/client/kms_client.c
index ddd9b89..b579b50 100644
--- a/kms/client/kms_client.c
+++ b/kms/client/kms_client.c
@@ -329,12 +329,12 @@ int gsr_kms_client_init(gsr_kms_client *self, const char *card_path) {
}
void cleanup_socket(gsr_kms_client *self, bool kill_server) {
- if(self->initial_client_fd != -1) {
+ if(self->initial_client_fd > 0) {
close(self->initial_client_fd);
self->initial_client_fd = -1;
}
- if(self->initial_socket_fd != -1) {
+ if(self->initial_socket_fd > 0) {
close(self->initial_socket_fd);
self->initial_socket_fd = -1;
}
@@ -348,7 +348,7 @@ void cleanup_socket(gsr_kms_client *self, bool kill_server) {
}
}
- if(kill_server && self->kms_server_pid != -1) {
+ if(kill_server && self->kms_server_pid > 0) {
kill(self->kms_server_pid, SIGKILL);
//int status;
//waitpid(self->kms_server_pid, &status, 0);