diff options
author | Robert Ancell <robert.ancell@canonical.com> | 2011-09-07 15:00:35 +1000 |
---|---|---|
committer | Robert Ancell <robert.ancell@canonical.com> | 2011-09-07 15:00:35 +1000 |
commit | 23be548487393076277956da59e98e9b64f338b6 (patch) | |
tree | 925dcde9e888213eda79e049c2ad0a2c6209ce10 /src/console-kit.c | |
parent | e339d11f5834ed760a7730001c1e1e8829ac5631 (diff) | |
download | lightdm-23be548487393076277956da59e98e9b64f338b6.tar.gz |
Remove some accidentally duplicated code
Diffstat (limited to 'src/console-kit.c')
-rw-r--r-- | src/console-kit.c | 60 |
1 files changed, 2 insertions, 58 deletions
diff --git a/src/console-kit.c b/src/console-kit.c index 0a772ab1..3ec54b27 100644 --- a/src/console-kit.c +++ b/src/console-kit.c @@ -88,6 +88,8 @@ ck_unlock_session (const gchar *cookie) if (!load_ck_proxy ()) return; + g_debug ("Unlocking ConsoleKit session %s", cookie); + result = g_dbus_proxy_call_sync (ck_proxy, "GetSessionForCookie", g_variant_new ("(s)", cookie), @@ -170,64 +172,6 @@ ck_unlock_session (const gchar *cookie) return; g_variant_unref (result); - proxy = g_dbus_proxy_new_for_bus_sync (G_BUS_TYPE_SYSTEM, - G_DBUS_PROXY_FLAGS_NONE, - NULL, - "org.freedesktop.ConsoleKit", - session_path, - "org.freedesktop.ConsoleKit.Session", - NULL, &error); - if (!proxy) - g_warning ("Unable to get connection to ConsoleKit session: %s", error->message); - g_variant_unref (result); - g_clear_error (&error); - if (!proxy) - return; - - result = g_dbus_proxy_call_sync (proxy, - "Unlock", - NULL, - G_DBUS_CALL_FLAGS_NONE, - -1, - NULL, - &error); - g_object_unref (proxy); - - if (!result) - g_warning ("Error unlocking ConsoleKit session: %s", error->message); - g_clear_error (&error); - if (!result) - return; - - g_variant_unref (result); - proxy = g_dbus_proxy_new_for_bus_sync (G_BUS_TYPE_SYSTEM, - G_DBUS_PROXY_FLAGS_NONE, - NULL, - "org.freedesktop.ConsoleKit", - session_path, - "org.freedesktop.ConsoleKit.Session", - NULL, &error); - if (!proxy) - g_warning ("Unable to get connection to ConsoleKit session: %s", error->message); - g_variant_unref (result); - g_clear_error (&error); - if (!proxy) - return; - - result = g_dbus_proxy_call_sync (proxy, - "Unlock", - NULL, - G_DBUS_CALL_FLAGS_NONE, - -1, - NULL, - &error); - g_object_unref (proxy); - - if (!result) - g_warning ("Error unlocking ConsoleKit session: %s", error->message); - g_clear_error (&error); - if (result) - g_variant_unref (result); } void |