diff options
author | Scott Balneaves <[email protected]> | 2013-06-12 09:18:36 -0500 |
---|---|---|
committer | Stefano Karapetsas <[email protected]> | 2013-10-15 14:56:13 +0200 |
commit | 2725ff7ec27f0158bc3d6bb118e5e5649180e474 (patch) | |
tree | 916784ea86f87e724fee1ebc5e0c59fccdd32b43 /mate-session/gsm-systemd.c | |
parent | b53f83e1fcd8929b9e9275eae098308df2ab5906 (diff) | |
download | mate-session-manager-2725ff7ec27f0158bc3d6bb118e5e5649180e474.tar.bz2 mate-session-manager-2725ff7ec27f0158bc3d6bb118e5e5649180e474.tar.xz |
Systemd support: session_id is char*, not int
Diffstat (limited to 'mate-session/gsm-systemd.c')
-rw-r--r-- | mate-session/gsm-systemd.c | 12 |
1 files 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; |