summaryrefslogtreecommitdiffstats
path: root/abs/extra-testing/consolekit/reorder-initialization.patch
blob: f65abd5e238edb28f0f9fb8c783657b7adeab05b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
diff -up ConsoleKit-0.4.1/src/main.c.reorder-initialization ConsoleKit-0.4.1/src/main.c
--- ConsoleKit-0.4.1/src/main.c.reorder-initialization	2009-12-18 14:51:38.821212946 -0500
+++ ConsoleKit-0.4.1/src/main.c	2009-12-18 14:52:19.246211176 -0500
@@ -294,11 +294,19 @@ main (int    argc,
 
         setup_debug_log (debug);
 
+        g_debug ("initializing console-kit-daemon %s", VERSION);
+
         connection = get_system_bus ();
         if (connection == NULL) {
                 goto out;
         }
 
+        manager = ck_manager_new ();
+
+        if (manager == NULL) {
+                goto out;
+        }
+
         bus_proxy = get_bus_proxy (connection);
         if (bus_proxy == NULL) {
                 g_warning ("Could not construct bus_proxy object; bailing out");
@@ -310,16 +318,8 @@ main (int    argc,
                 goto out;
         }
 
-        g_debug ("initializing console-kit-daemon %s", VERSION);
-
         create_pid_file ();
 
-        manager = ck_manager_new ();
-
-        if (manager == NULL) {
-                goto out;
-        }
-
         loop = g_main_loop_new (NULL, FALSE);
 
         g_signal_connect (bus_proxy,