[PATCH] dbus-connection.c: Remove the timer for the pending call's timeout in case the reply has timed out in blocking code.
John (J5) Palmieri
johnp at redhat.com
Fri May 16 09:04:04 PDT 2008
On Fri, 2008-05-16 at 15:15 +0200, Thiago Macieira wrote:
> This fixes bug 15684, which prevents crashes in some applications due
> to timers firing after the DBusPendingCall object has been freed.
> ---
> dbus/dbus-connection.c | 7 +++++++
> 1 files changed, 7 insertions(+), 0 deletions(-)
>
> diff --git a/dbus/dbus-connection.c b/dbus/dbus-connection.c
> index 3a1670c..7b13b24 100644
> --- a/dbus/dbus-connection.c
> +++ b/dbus/dbus-connection.c
> @@ -965,6 +965,13 @@ _dbus_connection_detach_pending_call_and_unlock
> (DBusConnection *connection,
> _dbus_pending_call_ref_unlocked (pending);
> _dbus_hash_table_remove_int (connection->pending_replies,
> _dbus_pending_call_get_reply_serial_unlocked
> (pending));
> +
> + if (_dbus_pending_call_is_timeout_added_unlocked (pending))
> + _dbus_connection_remove_timeout_unlocked (connection,
> + _dbus_pending_call_get_timeout_unlocked (pending));
> +
> + _dbus_pending_call_set_timeout_added_unlocked (pending, FALSE);
> +
> _dbus_pending_call_unref_and_unlock (pending);
> }
>
Thanks Thiago, I can't get to bugs right now. Can you commit and push
this to head and the dbus-1.2-branch? thanks.
--
John (J5) Palmieri <johnp at redhat.com>
More information about the dbus
mailing list