]> git.pld-linux.org Git - packages/PackageKit.git/blame - consolekit-fallback.patch
- updated to 1.0.8
[packages/PackageKit.git] / consolekit-fallback.patch
CommitLineData
bcd7526e
JR
1--- PackageKit-1.0.7/src/pk-dbus.c~ 2015-04-22 11:54:49.000000000 +0200
2+++ PackageKit-1.0.7/src/pk-dbus.c 2015-08-02 12:57:29.398321174 +0200
3@@ -28,6 +28,7 @@
4 #include <gio/gio.h>
5
6 #ifdef HAVE_SYSTEMD
7+ #include <systemd/sd-daemon.h>
8 #include <systemd/sd-login.h>
9 #endif
10
11@@ -222,9 +222,7 @@
12 pk_dbus_get_session (PkDbus *dbus, const gchar *sender)
13 {
14 gchar *session = NULL;
15-#ifndef HAVE_SYSTEMD
16 _cleanup_error_free_ GError *error = NULL;
17-#endif
18 guint pid;
19 _cleanup_variant_unref_ GVariant *value = NULL;
20
21@@ -252,8 +254,10 @@
22
23 /* get session from systemd or ConsoleKit */
24 #ifdef HAVE_SYSTEMD
25+ if (sd_booted () > 0) {
26 session = pk_dbus_get_session_systemd (pid);
27-#else
28+ } else {
29+#endif
30 /* get session from ConsoleKit */
31 value = g_dbus_proxy_call_sync (dbus->priv->proxy_session,
32 "GetSessionForUnixProcess",
33@@ -269,6 +273,8 @@
34 goto out;
35 }
36 g_variant_get (value, "(o)", &session);
37+#ifdef HAVE_SYSTEMD
38+ }
39 #endif
40 out:
41 return session;
This page took 0.070894 seconds and 4 git commands to generate.