[gnome-session] GsmConsoleKit: Properly initialize upower client
- From: Martin Pitt <martinpitt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-session] GsmConsoleKit: Properly initialize upower client
- Date: Tue, 13 Nov 2012 12:17:55 +0000 (UTC)
commit e7cbff3fb381c6d1666d148889a5e485d5e2e418
Author: Martin Pitt <martinpitt gnome org>
Date: Tue Nov 13 11:02:35 2012 +0100
GsmConsoleKit: Properly initialize upower client
Move UPower client initialization from gsm_consolekit_on_name_owner_changed()
(which is not actually called for UPower usually) into
gsm_consolekit_ensure_ck_connection().
This makes the UPower calls actually work, otherwise they fail on trying to
pass a NULL client.
https://bugzilla.gnome.org/show_bug.cgi?id=688229
gnome-session/gsm-consolekit.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/gnome-session/gsm-consolekit.c b/gnome-session/gsm-consolekit.c
index c20004a..26f0dd5 100644
--- a/gnome-session/gsm-consolekit.c
+++ b/gnome-session/gsm-consolekit.c
@@ -272,6 +272,9 @@ gsm_consolekit_ensure_ck_connection (GsmConsolekit *manager,
G_CALLBACK (on_active_changed), manager, NULL);
}
+ g_clear_object (&manager->priv->up_client);
+ manager->priv->up_client = up_client_new ();
+
is_connected = TRUE;
out:
@@ -309,10 +312,8 @@ gsm_consolekit_on_name_owner_changed (DBusGProxy *bus_proxy,
}
g_clear_object (&manager->priv->ck_proxy);
- g_clear_object (&manager->priv->up_client);
gsm_consolekit_ensure_ck_connection (manager, NULL);
- manager->priv->up_client = up_client_new ();
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]