[PATCH] dbus-connection.c: Remove the timer for the pending call's timeout in case the reply has timed out in blocking code.

Thiago Macieira thiago at kde.org
Fri May 16 11:06:13 PDT 2008


On Friday 16 May 2008 18:04:04 John (J5) Palmieri wrote:
> 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.

yes.

-- 
  Thiago Macieira  -  thiago (AT) macieira.info - thiago (AT) kde.org
    PGP/GPG: 0x6EF45358; fingerprint:
    E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://lists.freedesktop.org/archives/dbus/attachments/20080516/3d36029e/attachment-0001.pgp 


More information about the dbus mailing list