From 2725ff7ec27f0158bc3d6bb118e5e5649180e474 Mon Sep 17 00:00:00 2001 From: Scott Balneaves Date: Wed, 12 Jun 2013 09:18:36 -0500 Subject: Systemd support: session_id is char*, not int --- mate-session/gsm-systemd.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/mate-session/gsm-systemd.c b/mate-session/gsm-systemd.c index dbe8ea0..6b263c7 100644 --- a/mate-session/gsm-systemd.c +++ b/mate-session/gsm-systemd.c @@ -547,7 +547,7 @@ gsm_systemd_set_session_idle (GsmSystemd *manager, gboolean is_idle) { GError *error; - char *session_path; + char *session_path = NULL; DBusMessage *message; DBusMessage *reply; DBusError dbus_error; @@ -564,6 +564,8 @@ gsm_systemd_set_session_idle (GsmSystemd *manager, gsm_systemd_get_session_path (dbus_g_connection_get_connection (manager->priv->dbus_connection), &session_path); + g_return_if_fail (session_path != NULL); + g_debug ("Updating Systemd idle status: %d", is_idle); message = dbus_message_new_method_call (SD_NAME, session_path, @@ -600,7 +602,9 @@ gsm_systemd_can_switch_user (GsmSystemd *manager) { GError *error; char *session_id = NULL; +#ifdef HAVE_SYSTEMD char *seat_id = NULL; +#endif int ret = 0; error = NULL; @@ -864,9 +868,11 @@ gchar * gsm_systemd_get_current_session_type (GsmSystemd *manager) { GError *gerror; - int session_id; + gchar *session_id; gchar *session_class = NULL; +#ifdef HAVE_SYSTEMD int res; +#endif gerror = NULL; @@ -890,6 +896,8 @@ gsm_systemd_get_current_session_type (GsmSystemd *manager) g_warning ("Could not get Systemd session class!"); return NULL; } + + g_free (session_id); #endif return session_class; -- cgit v1.2.1