aboutsummaryrefslogtreecommitdiff
path: root/src/users-service-dbus.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/users-service-dbus.c')
-rw-r--r--src/users-service-dbus.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/users-service-dbus.c b/src/users-service-dbus.c
index d377089..4aefdff 100644
--- a/src/users-service-dbus.c
+++ b/src/users-service-dbus.c
@@ -1,3 +1,4 @@
+/* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */
/*
* Copyright 2009 Canonical Ltd.
*
@@ -33,6 +34,7 @@
#include "users-service-dbus.h"
#include "users-service-client.h"
#include "users-service-marshal.h"
+#include "consolekit-manager-client.h"
static void users_service_dbus_class_init (UsersServiceDbusClass *klass);
static void users_service_dbus_init (UsersServiceDbus *self);
@@ -183,7 +185,8 @@ users_service_dbus_init (UsersServiceDbus *self)
create_ck_proxy (self);
create_seat_proxy (self);
- users_loaded (priv->gdm_proxy, self);
+ if (priv->gdm_proxy)
+ users_loaded (priv->gdm_proxy, self);
}
static void
@@ -214,7 +217,7 @@ create_gdm_proxy (UsersServiceDbus *self)
{
if (error != NULL)
{
- g_error ("Unable to get DisplayManager proxy on system bus: %s", error->message);
+ g_warning ("Unable to get DisplayManager proxy on system bus: %s", error->message);
g_error_free (error);
}
@@ -507,14 +510,7 @@ add_sessions_for_user (UsersServiceDbus *self,
int i;
error = NULL;
- if (!dbus_g_proxy_call (priv->ck_proxy,
- "GetSessionsForUnixUser",
- &error,
- G_TYPE_UINT, user->uid,
- G_TYPE_INVALID,
- dbus_g_type_get_collection ("GPtrArray", DBUS_TYPE_G_OBJECT_PATH),
- &sessions,
- G_TYPE_INVALID))
+ if (!org_freedesktop_ConsoleKit_Manager_get_sessions_for_unix_user(priv->ck_proxy, user->uid, &sessions, &error))
{
g_debug ("Failed to call GetSessionsForUnixUser: %s", error->message);
g_error_free (error);
@@ -660,6 +656,7 @@ sync_users (UsersServiceDbus *self)
user->shell = g_strdup (g_value_get_string (g_value_array_get_nth (values, 3)));
user->login_count = g_value_get_int (g_value_array_get_nth (values, 4));
user->icon_url = g_strdup (g_value_get_string (g_value_array_get_nth (values, 5)));
+ user->real_name_conflict = FALSE;
g_hash_table_insert (priv->users,
g_strdup (user->user_name),
@@ -679,6 +676,8 @@ users_loaded (DBusGProxy *proxy,
GError *error = NULL;
gint count;
+ g_return_if_fail (proxy != NULL);
+
service = (UsersServiceDbus *)user_data;
priv = USERS_SERVICE_DBUS_GET_PRIVATE (service);
@@ -859,6 +858,8 @@ gboolean
start_new_user_session (UsersServiceDbus *self,
UserData *user)
{
+ g_return_val_if_fail (IS_USERS_SERVICE_DBUS (self), FALSE);
+
UsersServiceDbusPrivate *priv = USERS_SERVICE_DBUS_GET_PRIVATE (self);
GError *error = NULL;
char *ssid;