From 923a778519e1987dc2dc26ae493e9d7bea2f00c9 Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Thu, 30 Aug 2018 14:01:55 -0400 Subject: manager: better logind handling commit 9ee68d5c8 highlights we've incorrectly used ENOENT instead of ENXIO when checking for non-existing sessions/seats with logind. This commit mops up all the other cases. --- daemon/gdm-manager.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'daemon/gdm-manager.c') diff --git a/daemon/gdm-manager.c b/daemon/gdm-manager.c index b52512d2..b42e9b9e 100644 --- a/daemon/gdm-manager.c +++ b/daemon/gdm-manager.c @@ -371,7 +371,7 @@ is_remote_session (GdmManager *self, seat = NULL; ret = sd_session_get_seat (session_id, &seat); - if (ret < 0 && ret != -ENOENT) { + if (ret < 0 && ret != -ENXIO) { g_debug ("GdmManager: Error while retrieving seat for session %s: %s", session_id, strerror (-ret)); } @@ -396,7 +396,7 @@ get_seat_id_for_session_id (const char *session_id, seat = NULL; ret = sd_session_get_seat (session_id, &seat); - if (ret == -ENOENT) { + if (ret == -ENXIO) { out_seat = NULL; } else if (ret < 0) { g_set_error (error, @@ -423,7 +423,7 @@ get_tty_for_session_id (const char *session_id, ret = sd_session_get_tty (session_id, &tty); - if (ret == -ENOENT) { + if (ret == -ENXIO) { out_tty = NULL; } else if (ret < 0) { g_set_error (error, -- cgit v1.2.1