diff options
author | Ted Gould <ted@gould.cx> | 2010-03-17 14:00:06 -0500 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2010-03-17 14:00:06 -0500 |
commit | 89fe9da54e180a055eb155b94002ff1393d44a9f (patch) | |
tree | 258e81b78b9d5188ce058c0b3a0644f13a6fbda0 /src/users-service-dbus.c | |
parent | 05b52fcee1c26b0f8dd703a61226ffdb60ff301e (diff) | |
download | ayatana-indicator-session-89fe9da54e180a055eb155b94002ff1393d44a9f.tar.gz ayatana-indicator-session-89fe9da54e180a055eb155b94002ff1393d44a9f.tar.bz2 ayatana-indicator-session-89fe9da54e180a055eb155b94002ff1393d44a9f.zip |
Using defines to make sure the strings are right.
Diffstat (limited to 'src/users-service-dbus.c')
-rw-r--r-- | src/users-service-dbus.c | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/src/users-service-dbus.c b/src/users-service-dbus.c index 5b1bcd7..504eeee 100644 --- a/src/users-service-dbus.c +++ b/src/users-service-dbus.c @@ -38,6 +38,10 @@ #include "consolekit-manager-client.h" #include "consolekit-session-client.h" +#define CK_ADDR "org.freedesktop.ConsoleKit" +#define CK_SESSION_IFACE "org.freedesktop.ConsoleKit.Session" + + static void users_service_dbus_class_init (UsersServiceDbusClass *klass); static void users_service_dbus_init (UsersServiceDbus *self); static void users_service_dbus_dispose (GObject *object); @@ -361,9 +365,9 @@ create_cksession_proxy (UsersServiceDbus *service) UsersServiceDbusPrivate *priv = USERS_SERVICE_DBUS_GET_PRIVATE (service); priv->session_proxy = dbus_g_proxy_new_for_name (priv->system_bus, - "org.freedesktop.ConsoleKit", + CK_ADDR, priv->ssid, - "org.freedesktop.ConsoleKit.Session"); + CK_SESSION_IFACE); if (!priv->session_proxy) { @@ -437,10 +441,11 @@ get_unix_user (UsersServiceDbus *service, guint uid; DBusGProxy *session_proxy; + g_debug("Building session proxy for: %s", session_id); session_proxy = dbus_g_proxy_new_for_name_owner(priv->system_bus, - "org.freedesktop.ConsoleKit", + CK_ADDR, session_id, - "org.freedesktop.ConsoleKit.Session", + CK_SESSION_IFACE, &error); if (error != NULL) { @@ -483,9 +488,9 @@ do_add_session (UsersServiceDbus *service, GList *l; session_proxy = dbus_g_proxy_new_for_name_owner(priv->system_bus, - "org.freedesktop.ConsoleKit", + CK_ADDR, ssid, - "org.freedesktop.ConsoleKit.Session", + CK_SESSION_IFACE, &error); if (error != NULL) { @@ -767,9 +772,9 @@ session_is_login_window (UsersServiceDbus *self, char *type = NULL; if (!(proxy = dbus_g_proxy_new_for_name (priv->system_bus, - "org.freedesktop.ConsoleKit", + CK_ADDR, ssid, - "org.freedesktop.ConsoleKit.Session"))) + CK_SESSION_IFACE))) { g_warning ("Failed to get ConsoleKit proxy"); |