Blame SOURCES/0010-lib-retry-connecting-to-accountsservice-when-loading.patch

34a24a
From 9b03e52b2504f215f960549c53bd4f617797dedd Mon Sep 17 00:00:00 2001
34a24a
From: Ray Strode <rstrode@redhat.com>
34a24a
Date: Tue, 3 Oct 2017 10:04:28 -0400
34a24a
Subject: [PATCH 10/13] lib: retry connecting to accountsservice when loading
34a24a
 users
34a24a
34a24a
If we were unable to connect to accountsservice and we need to
34a24a
load users again, then try again.
34a24a
---
34a24a
 src/libaccountsservice/act-user-manager.c | 4 ++++
34a24a
 1 file changed, 4 insertions(+)
34a24a
34a24a
diff --git a/src/libaccountsservice/act-user-manager.c b/src/libaccountsservice/act-user-manager.c
34a24a
index 5ac157d..c8a0e20 100644
34a24a
--- a/src/libaccountsservice/act-user-manager.c
34a24a
+++ b/src/libaccountsservice/act-user-manager.c
34a24a
@@ -2544,60 +2544,64 @@ load_console_kit_sessions (ActUserManager *manager)
34a24a
                 g_debug ("ActUserManager: no seat proxy; can't load sessions");
34a24a
                 return;
34a24a
         }
34a24a
 
34a24a
         manager->priv->getting_sessions = TRUE;
34a24a
         console_kit_seat_call_get_sessions (manager->priv->seat.seat_proxy,
34a24a
                                             NULL,
34a24a
                                             on_get_sessions_finished,
34a24a
                                             g_object_ref (manager));
34a24a
 }
34a24a
 
34a24a
 static void
34a24a
 load_sessions (ActUserManager *manager)
34a24a
 {
34a24a
 #ifdef WITH_SYSTEMD
34a24a
         if (LOGIND_RUNNING()) {
34a24a
                 reload_systemd_sessions (manager);
34a24a
                 maybe_set_is_loaded (manager);
34a24a
                 return;
34a24a
         }
34a24a
 #endif
34a24a
         load_console_kit_sessions (manager);
34a24a
 }
34a24a
 
34a24a
 static void
34a24a
 load_users (ActUserManager *manager)
34a24a
 {
34a24a
         g_assert (manager->priv->accounts_proxy != NULL);
34a24a
         g_debug ("ActUserManager: calling 'ListCachedUsers'");
34a24a
 
34a24a
+        if (!ensure_accounts_proxy (manager)) {
34a24a
+                return;
34a24a
+        }
34a24a
+
34a24a
         accounts_accounts_call_list_cached_users (manager->priv->accounts_proxy,
34a24a
                                                   NULL,
34a24a
                                                   on_list_cached_users_finished,
34a24a
                                                   g_object_ref (manager));
34a24a
         manager->priv->listing_cached_users = TRUE;
34a24a
 }
34a24a
 
34a24a
 static gboolean
34a24a
 load_seat_incrementally (ActUserManager *manager)
34a24a
 {
34a24a
         manager->priv->seat.load_idle_id = 0;
34a24a
 
34a24a
         switch (manager->priv->seat.state) {
34a24a
         case ACT_USER_MANAGER_SEAT_STATE_GET_SESSION_ID:
34a24a
                 get_current_session_id (manager);
34a24a
                 break;
34a24a
         case ACT_USER_MANAGER_SEAT_STATE_GET_SESSION_PROXY:
34a24a
                 get_session_proxy (manager);
34a24a
                 break;
34a24a
         case ACT_USER_MANAGER_SEAT_STATE_GET_ID:
34a24a
                 get_seat_id_for_current_session (manager);
34a24a
                 break;
34a24a
         case ACT_USER_MANAGER_SEAT_STATE_GET_SEAT_PROXY:
34a24a
                 get_seat_proxy (manager);
34a24a
                 break;
34a24a
         case ACT_USER_MANAGER_SEAT_STATE_LOADED:
34a24a
                 g_debug ("ActUserManager: Seat loading sequence complete");
34a24a
                 break;
34a24a
         default:
34a24a
                 g_assert_not_reached ();
34a24a
-- 
34a24a
2.14.1
34a24a