[Spice-devel] [vdagent-linux v2 3/6] console-kit: save verbosity level for debugging
Victor Toso
victortoso at redhat.com
Sat Apr 23 10:27:50 UTC 2016
---
src/console-kit.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/src/console-kit.c b/src/console-kit.c
index c45f662..fc73cf2 100644
--- a/src/console-kit.c
+++ b/src/console-kit.c
@@ -32,6 +32,7 @@ struct session_info {
int fd;
char *seat;
char *active_session;
+ int verbose;
};
#define INTERFACE_CONSOLE_KIT "org.freedesktop.ConsoleKit"
@@ -55,6 +56,8 @@ struct session_info *session_info_create(int verbose)
if (!si)
return NULL;
+ si->verbose = verbose;
+
dbus_error_init(&error);
si->connection = dbus_bus_get_private(DBUS_BUS_SYSTEM, &error);
if (si->connection == NULL || dbus_error_is_set(&error)) {
@@ -172,6 +175,8 @@ exit:
dbus_message_unref(message);
}
+ if (si->verbose)
+ syslog(LOG_DEBUG, "(console-kit) seat: %s", si->seat);
return si->seat;
}
@@ -360,5 +365,9 @@ static char *console_kit_check_active_session_change(struct session_info *si)
dbus_connection_read_write(si->connection, 0);
}
+ if (si->verbose)
+ syslog(LOG_DEBUG, "(console-kit) active-session: '%s'",
+ (si->active_session ? si->active_session : "None"));
+
return si->active_session;
}
--
2.5.5
More information about the Spice-devel
mailing list