diff options
author | Christian Persch <chpe@gnome.org> | 2010-05-10 12:40:17 (GMT) |
---|---|---|
committer | Carlos Garcia Campos <carlosgc@gnome.org> | 2010-05-25 07:38:30 (GMT) |
commit | c4589297f7b7f7813c9b3e62ef678dfa5a5f5190 (patch) | |
tree | ed4aee4912a8a87d37b0da9f6bd3413669551f05 /shell | |
parent | 3afaa8ad7c4f63b67e0caa4c0bfc3b832de8e351 (diff) |
[daemon] Add some debug logging to the daemon
Diffstat (limited to 'shell')
-rw-r--r-- | shell/ev-daemon.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/shell/ev-daemon.c b/shell/ev-daemon.c index 9aed23e..b304dfc 100644 --- a/shell/ev-daemon.c +++ b/shell/ev-daemon.c @@ -37,6 +37,8 @@ #define DAEMON_TIMEOUT (30) /* seconds */ +#define LOG g_printerr + static GList *ev_daemon_docs = NULL; static guint kill_timer_id; @@ -88,6 +90,8 @@ ev_daemon_shutdown (gpointer user_data) { GMainLoop *loop = (GMainLoop *) user_data; + LOG ("Timeout; exiting daemon.\n"); + if (g_main_loop_is_running (loop)) g_main_loop_quit (loop); @@ -264,7 +268,10 @@ method_call_cb (GDBusConnection *connection, name_vanished_cb, user_data, NULL); + LOG ("RegisterDocument registered owner '%s' for URI '%s'\n", doc->dbus_name, uri); ev_daemon_docs = g_list_prepend (ev_daemon_docs, doc); + } else { + LOG ("RegisterDocument found owner '%s' for URI '%s'\n", doc->dbus_name, uri); } g_dbus_method_invocation_return_value (invocation, @@ -277,8 +284,11 @@ method_call_cb (GDBusConnection *connection, g_variant_get (parameters, "(&s)", &uri); + LOG ("UnregisterDocument URI '%s'\n", uri); + doc = ev_daemon_find_doc (uri); if (doc == NULL) { + LOG ("UnregisterDocument URI was not registered!\n"); g_dbus_method_invocation_return_error_literal (invocation, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, @@ -287,6 +297,9 @@ method_call_cb (GDBusConnection *connection, } if (strcmp (doc->dbus_name, sender) != 0) { + LOG ("UnregisterDocument called by non-owner (owner '%s' sender '%s')\n", + doc->dbus_name, sender); + g_dbus_method_invocation_return_error_literal (invocation, G_DBUS_ERROR, G_DBUS_ERROR_BAD_ADDRESS, |