diff options
author | David Zeuthen <davidz@redhat.com> | 2010-08-04 16:59:26 -0400 |
---|---|---|
committer | David Zeuthen <davidz@redhat.com> | 2010-08-04 16:59:26 -0400 |
commit | d52e1c33f71a28908dac3658a8d5394e333324fc (patch) | |
tree | a3fa7bf753c12a0ba28a3739ddaa4c5fbeb2ce5c /gio/gdbusprivate.c | |
parent | 89a1b571adde644664093dd4763fb9aa077dfafc (diff) |
GDBus: Add `return' debug option
This prints all GDBusMethodInvocation API usage and is normally used
with the `incoming' option. Example:
# G_DBUS_DEBUG=incoming,return ./polkitd --replace
Entering main event loop
Connected to the system bus
Registering null backend at priority -10
[...]
Acquired the name org.freedesktop.PolicyKit1
[...]
========================================================================
GDBus-debug:Incoming:
<<<< METHOD INVOCATION org.freedesktop.PolicyKit1.Authority.RegisterAuthenticationAgent()
on object /org/freedesktop/PolicyKit1/Authority
invoked by name :1.26
serial 299
========================================================================
GDBus-debug:Return:
>>>> METHOD ERROR org.freedesktop.PolicyKit1.Error.Failed
message `Cannot determine session the caller is in'
in response to org.freedesktop.PolicyKit1.Authority.RegisterAuthenticationAgent()
on object /org/freedesktop/PolicyKit1/Authority
to name :1.26
reply-serial 299
[...]
========================================================================
GDBus-debug:Incoming:
<<<< METHOD INVOCATION org.freedesktop.PolicyKit1.Authority.RegisterAuthenticationAgent()
on object /org/freedesktop/PolicyKit1/Authority
invoked by name :1.2402
serial 25
========================================================================
GDBus-debug:Return:
>>>> METHOD RETURN
in response to org.freedesktop.PolicyKit1.Authority.RegisterAuthenticationAgent()
on object /org/freedesktop/PolicyKit1/Authority
to name :1.2402
reply-serial 25
Signed-off-by: David Zeuthen <davidz@redhat.com>
Diffstat (limited to 'gio/gdbusprivate.c')
-rw-r--r-- | gio/gdbusprivate.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/gio/gdbusprivate.c b/gio/gdbusprivate.c index cacbf68d8..cd6eb91aa 100644 --- a/gio/gdbusprivate.c +++ b/gio/gdbusprivate.c @@ -1178,8 +1178,9 @@ _g_dbus_worker_flush_sync (GDBusWorker *worker, #define G_DBUS_DEBUG_CALL (1<<3) #define G_DBUS_DEBUG_SIGNAL (1<<4) #define G_DBUS_DEBUG_INCOMING (1<<5) -#define G_DBUS_DEBUG_EMISSION (1<<6) -#define G_DBUS_DEBUG_ADDRESS (1<<7) +#define G_DBUS_DEBUG_RETURN (1<<6) +#define G_DBUS_DEBUG_EMISSION (1<<7) +#define G_DBUS_DEBUG_ADDRESS (1<<8) static gint _gdbus_debug_flags = 0; @@ -1226,6 +1227,13 @@ _g_dbus_debug_incoming (void) } gboolean +_g_dbus_debug_return (void) +{ + _g_dbus_initialize (); + return (_gdbus_debug_flags & G_DBUS_DEBUG_RETURN) != 0; +} + +gboolean _g_dbus_debug_emission (void) { _g_dbus_initialize (); @@ -1283,6 +1291,7 @@ _g_dbus_initialize (void) { "call", G_DBUS_DEBUG_CALL }, { "signal", G_DBUS_DEBUG_SIGNAL }, { "incoming", G_DBUS_DEBUG_INCOMING }, + { "return", G_DBUS_DEBUG_RETURN }, { "emission", G_DBUS_DEBUG_EMISSION }, { "address", G_DBUS_DEBUG_ADDRESS } }; |