summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Balneaves <[email protected]>2013-06-12 09:18:36 -0500
committerinfirit <[email protected]>2013-12-17 14:50:46 +0100
commitd0544bae0a7938f46b0b2c778568d71ce1f04f24 (patch)
tree16f5b06c485abd9c14dd5f38e996520491e7d695
parente934e91226e9a93956121c9c84ecf3664fcd68be (diff)
downloadmate-session-manager-d0544bae0a7938f46b0b2c778568d71ce1f04f24.tar.bz2
mate-session-manager-d0544bae0a7938f46b0b2c778568d71ce1f04f24.tar.xz
Systemd support: session_id is char*, not int
-rw-r--r--mate-session/gsm-systemd.c12
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;