From 9e4450872a6861bd93a01dabe14d2d16f6c84d3f Mon Sep 17 00:00:00 2001 From: Havoc Pennington Date: Wed, 16 Feb 2005 04:37:27 +0000 Subject: 2005-02-15 Havoc Pennington * dbus/dbus-connection.c (dbus_connection_dispatch): always complete a pending call, don't run filters first. * glib/dbus-gproxy.c (dbus_g_proxy_end_call): change to use dbus_pending_call_steal_reply * dbus/dbus-pending-call.c (dbus_pending_call_block): just call _dbus_connection_block_pending_call (dbus_pending_call_get_reply): change to steal_reply and return a ref * dbus/dbus-connection.c (dbus_connection_send_with_reply_and_block): port to work in terms of DBusPendingCall (_dbus_connection_block_pending_call): replace block_for_reply with this --- glib/dbus-gproxy.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'glib/dbus-gproxy.c') diff --git a/glib/dbus-gproxy.c b/glib/dbus-gproxy.c index 1c2f4a1d..17b76d93 100644 --- a/glib/dbus-gproxy.c +++ b/glib/dbus-gproxy.c @@ -1386,7 +1386,7 @@ dbus_g_proxy_end_call (DBusGProxy *proxy, g_return_val_if_fail (pending != NULL, FALSE); dbus_pending_call_block (DBUS_PENDING_CALL_FROM_G_PENDING_CALL (pending)); - message = dbus_pending_call_get_reply (DBUS_PENDING_CALL_FROM_G_PENDING_CALL (pending)); + message = dbus_pending_call_steal_reply (DBUS_PENDING_CALL_FROM_G_PENDING_CALL (pending)); g_assert (message != NULL); @@ -1403,6 +1403,7 @@ dbus_g_proxy_end_call (DBusGProxy *proxy, } va_end (args); + dbus_message_unref (message); return TRUE; case DBUS_MESSAGE_TYPE_ERROR: @@ -1416,6 +1417,8 @@ dbus_g_proxy_end_call (DBusGProxy *proxy, } error: + dbus_message_unref (message); + dbus_set_g_error (error, &derror); dbus_error_free (&derror); return FALSE; -- cgit