diff options
author | Ondrej Holy <oholy@redhat.com> | 2017-02-13 19:05:14 +0100 |
---|---|---|
committer | Ondrej Holy <oholy@redhat.com> | 2017-02-13 19:09:12 +0100 |
commit | d99161de0e40ef879547d56f4a062eae6e81f4f1 (patch) | |
tree | fb8f0ebbf07f2c2d3b3e850eb703ed3f443d4289 | |
parent | febe35c3f538cb01916c0b8e3b006fda3dedb7b4 (diff) | |
download | gvfs-d99161de0e40ef879547d56f4a062eae6e81f4f1.tar.gz |
daemon: Print client pid in debug output
It is pretty difficult to get client pid currently when debugging.
Let's print them from invocation handler.
-rw-r--r-- | daemon/gvfsbackend.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/daemon/gvfsbackend.c b/daemon/gvfsbackend.c index 711c533a..e22659a4 100644 --- a/daemon/gvfsbackend.c +++ b/daemon/gvfsbackend.c @@ -606,9 +606,16 @@ g_vfs_backend_invocation_first_handler (GVfsDBusMount *object, GDBusMethodInvocation *invocation, GVfsBackend *backend) { - g_debug ("backend_dbus_handler %s:%s\n", + GDBusConnection *connection; + GCredentials *credentials; + + connection = g_dbus_method_invocation_get_connection (invocation); + credentials = g_dbus_connection_get_peer_credentials (connection); + + g_debug ("backend_dbus_handler %s:%s (pid=%u)\n", g_dbus_method_invocation_get_interface_name (invocation), - g_dbus_method_invocation_get_method_name (invocation)); + g_dbus_method_invocation_get_method_name (invocation), + g_credentials_get_unix_pid (credentials, NULL)); if (backend->priv->block_requests) { |