[vdagent-linux v1 5/8] console-kit: save verbosity level for debugging

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 src/console-kit.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/console-kit.c b/src/console-kit.c
index a72d9c2..04437af 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;
+    gint 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,6 +365,8 @@ 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);
     return si->active_session;
 }
 
-- 
2.5.5

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]