diff options
author | Havoc Pennington <hp@redhat.com> | 2003-10-16 06:34:51 +0000 |
---|---|---|
committer | Havoc Pennington <hp@redhat.com> | 2003-10-16 06:34:51 +0000 |
commit | d6e1b2adb3d8e51ce1bb47295cef12d9fe1a15a8 (patch) | |
tree | d94b220a2886b384ddc4f55df4689d79430a6399 /glib | |
parent | 9b9dd4b80eb2753fc67bed1f48eef89674ba968e (diff) |
2003-10-16 Havoc Pennington <hp@redhat.com>
* bus/connection.c (bus_pending_reply_expired): either cancel or
execute, not both
(bus_connections_check_reply): use unlink, not remove_link, as we
don't want to free the link; fixes double free mess
* dbus/dbus-pending-call.c (dbus_pending_call_block): fix in case
where no reply was received
* dbus/dbus-connection.c (_dbus_pending_call_complete_and_unlock):
fix a refcount leak
* bus/signals.c (match_rule_matches): add special cases for the
bus driver, so you can match on sender/destination for it.
* dbus/dbus-sysdeps.c (_dbus_abort): print backtrace if
DBUS_PRINT_BACKTRACE is set
* dbus/dbus-internals.c: add pid to assertion failure messages
* dbus/dbus-connection.c: add message type code to the debug spew
* glib/dbus-gproxy.c (gproxy_get_match_rule): match rules want
sender=foo not service=foo
* dbus/dbus-bus.c (dbus_bus_get): if the activation bus is the
session bus but DBUS_SESSION_BUS_ADDRESS isn't set, use
DBUS_ACTIVATION_ADDRESS instead
* bus/activation.c: set DBUS_SESSION_BUS_ADDRESS,
DBUS_SYSTEM_BUS_ADDRESS if appropriate
* bus/bus.c (bus_context_new): handle OOM copying bus type into
context struct
* dbus/dbus-message.c (dbus_message_iter_get_object_path): new function
(dbus_message_iter_get_object_path_array): new function (half
finished, disabled for the moment)
* glib/dbus-gproxy.c (dbus_gproxy_end_call): properly handle
DBUS_MESSAGE_TYPE_ERROR
* tools/dbus-launch.c (babysit): support DBUS_DEBUG_OUTPUT to
avoid redirecting stderr to /dev/null
(babysit): close stdin if not doing the "exit_with_session" thing
* dbus/dbus-sysdeps.c (_dbus_become_daemon): delete some leftover
debug code; change DBUS_DEBUG_OUTPUT to only enable stderr, not
stdout/stdin, so things don't get confused
* bus/system.conf.in: fix to allow replies, I modified .conf
instead of .conf.in again.
Diffstat (limited to 'glib')
-rw-r--r-- | glib/dbus-gproxy.c | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/glib/dbus-gproxy.c b/glib/dbus-gproxy.c index f5e59186..90f00b25 100644 --- a/glib/dbus-gproxy.c +++ b/glib/dbus-gproxy.c @@ -380,7 +380,7 @@ gproxy_get_match_rule (DBusGProxy *proxy) /* FIXME Some sort of escaping is required here I think */ if (proxy->service) - return g_strdup_printf ("type='signal',service='%s',path='%s',interface='%s'", + return g_strdup_printf ("type='signal',sender='%s',path='%s',interface='%s'", proxy->service, proxy->path, proxy->interface); else return g_strdup_printf ("type='signal',path='%s',interface='%s'", @@ -1068,15 +1068,29 @@ dbus_gproxy_end_call (DBusGProxy *proxy, g_assert (message != NULL); dbus_error_init (&derror); - va_start (args, first_arg_type); - if (!dbus_message_get_args_valist (message, &derror, first_arg_type, args)) + + switch (dbus_message_get_type (message)) { + case DBUS_MESSAGE_TYPE_METHOD_RETURN: + va_start (args, first_arg_type); + if (!dbus_message_get_args_valist (message, &derror, first_arg_type, args)) + { + va_end (args); + goto error; + } va_end (args); + + return TRUE; + + case DBUS_MESSAGE_TYPE_ERROR: + dbus_set_error_from_message (&derror, message); goto error; - } - va_end (args); - return TRUE; + default: + dbus_set_error (&derror, DBUS_ERROR_FAILED, + "Reply was neither a method return nor an exception"); + goto error; + } error: dbus_set_g_error (error, &derror); |