summaryrefslogtreecommitdiff
path: root/src/console-kit.c
diff options
context:
space:
mode:
authorRobert Ancell <robert.ancell@canonical.com>2011-09-07 15:37:55 +1000
committerRobert Ancell <robert.ancell@canonical.com>2011-09-07 15:37:55 +1000
commit5fe2aff9775b984fb5564ca80367911f30051618 (patch)
tree786cabfe3a8144a80da97a7d39c9a3eacdce137b /src/console-kit.c
parent23be548487393076277956da59e98e9b64f338b6 (diff)
downloadlightdm-5fe2aff9775b984fb5564ca80367911f30051618.tar.gz
Get ultra paranoid in checking if error objects are set before printing them out
Diffstat (limited to 'src/console-kit.c')
-rw-r--r--src/console-kit.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/console-kit.c b/src/console-kit.c
index 3ec54b27..56eb17e8 100644
--- a/src/console-kit.c
+++ b/src/console-kit.c
@@ -29,7 +29,7 @@ load_ck_proxy (void)
"/org/freedesktop/ConsoleKit/Manager",
"org.freedesktop.ConsoleKit.Manager",
NULL, &error);
- if (!ck_proxy)
+ if (error)
g_warning ("Unable to get connection to ConsoleKit: %s", error->message);
g_clear_error (&error);
}
@@ -57,7 +57,7 @@ ck_open_session (GVariantBuilder *parameters)
NULL,
&error);
- if (!result)
+ if (error)
g_warning ("Failed to open CK session: %s", error->message);
g_clear_error (&error);
if (!result)
@@ -97,7 +97,7 @@ ck_unlock_session (const gchar *cookie)
-1,
NULL,
&error);
- if (!result)
+ if (error)
g_warning ("Error getting ConsoleKit session: %s", error->message);
g_clear_error (&error);
if (!result)
@@ -120,7 +120,7 @@ ck_unlock_session (const gchar *cookie)
NULL, &error);
g_free (session_path);
- if (!proxy)
+ if (error)
g_warning ("Unable to get connection to ConsoleKit session: %s", error->message);
g_clear_error (&error);
if (!proxy)
@@ -135,7 +135,7 @@ ck_unlock_session (const gchar *cookie)
&error);
g_object_unref (proxy);
- if (!result)
+ if (error)
g_warning ("Error unlocking ConsoleKit session: %s", error->message);
g_clear_error (&error);
if (!result)
@@ -149,7 +149,7 @@ ck_unlock_session (const gchar *cookie)
session_path,
"org.freedesktop.ConsoleKit.Session",
NULL, &error);
- if (!proxy)
+ if (error)
g_warning ("Unable to get connection to ConsoleKit session: %s", error->message);
g_variant_unref (result);
g_clear_error (&error);
@@ -165,7 +165,7 @@ ck_unlock_session (const gchar *cookie)
&error);
g_object_unref (proxy);
- if (!result)
+ if (error)
g_warning ("Error unlocking ConsoleKit session: %s", error->message);
g_clear_error (&error);
if (!result)
@@ -195,7 +195,7 @@ ck_close_session (const gchar *cookie)
NULL,
&error);
- if (!result)
+ if (error)
g_warning ("Error ending ConsoleKit session: %s", error->message);
g_clear_error (&error);
if (!result)