[gdm] daemon: more consolekit fixes
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gdm] daemon: more consolekit fixes
- Date: Wed, 1 Aug 2012 21:10:09 +0000 (UTC)
commit caf6aa69079ae116399cff95c7fb943da370acb6
Author: Ray Strode <rstrode redhat com>
Date: Wed Aug 1 16:19:50 2012 -0400
daemon: more consolekit fixes
This commit changes how we extract the session information from consolekit
in a way that's actually gdbus/gvariant friendly.
daemon/gdm-manager.c | 8 ++------
1 files changed, 2 insertions(+), 6 deletions(-)
---
diff --git a/daemon/gdm-manager.c b/daemon/gdm-manager.c
index bb43c0f..6d6f241 100644
--- a/daemon/gdm-manager.c
+++ b/daemon/gdm-manager.c
@@ -368,7 +368,6 @@ get_session_id_for_user_on_seat_consolekit (GDBusConnection *connection,
GError **error)
{
GVariant *reply;
- GVariant *array;
const gchar **sessions;
char *session = NULL;
struct passwd *pwent;
@@ -404,10 +403,7 @@ get_session_id_for_user_on_seat_consolekit (GDBusConnection *connection,
return NULL;
}
- g_variant_get (reply, "(ao)", &array);
-
- sessions = g_variant_get_objv (array, NULL);
-
+ g_variant_get_child (reply, 0, "^a&o", &sessions);
for (i = 0; sessions[i] != NULL; i++) {
GVariant *reply2;
GError *error2 = NULL;
@@ -429,7 +425,7 @@ get_session_id_for_user_on_seat_consolekit (GDBusConnection *connection,
continue;
}
- g_variant_get (reply, "(o)", &session_seat_id);
+ g_variant_get (reply2, "(o)", &session_seat_id);
g_variant_unref (reply2);
if (g_strcmp0 (seat, session_seat_id) != 0) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]