diff options
-rw-r--r-- | daemon/gdm-manager.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/daemon/gdm-manager.c b/daemon/gdm-manager.c index 26b2c667..1370bab4 100644 --- a/daemon/gdm-manager.c +++ b/daemon/gdm-manager.c @@ -1345,6 +1345,11 @@ get_login_window_session_id (const char *seat_id, res = sd_session_get_class (sessions[i], &service_class); if (res < 0) { + if (res == -ENOENT) { + free (service_class); + continue; + } + g_debug ("failed to determine class of session %s: %s", sessions[i], strerror (-res)); ret = FALSE; goto out; @@ -1359,6 +1364,9 @@ get_login_window_session_id (const char *seat_id, ret = sd_session_get_state (sessions[i], &state); if (ret < 0) { + if (res == -ENOENT) + continue; + g_debug ("failed to determine state of session %s: %s", sessions[i], strerror (-res)); ret = FALSE; goto out; @@ -1372,6 +1380,8 @@ get_login_window_session_id (const char *seat_id, res = sd_session_get_service (sessions[i], &service_id); if (res < 0) { + if (res == -ENOENT) + continue; g_debug ("failed to determine service of session %s: %s", sessions[i], strerror (-res)); ret = FALSE; goto out; @@ -1424,7 +1434,7 @@ maybe_activate_other_session (GdmManager *self, GdmDisplay *old_display) { char *seat_id = NULL; - char *session_id; + char *session_id = NULL; int ret; g_object_get (G_OBJECT (old_display), @@ -1440,9 +1450,11 @@ maybe_activate_other_session (GdmManager *self, lookup_by_session_id, (gpointer) session_id); - if (display == NULL) { + if (display == NULL || gdm_display_get_status (display) == GDM_DISPLAY_FINISHED) { activate_login_window_session_on_seat (self, seat_id); } + + g_free (session_id); } g_free (seat_id); |