[patch] the most horrible patch ever
Olivier Andrieu
oliv__a at users.sourceforge.net
Fri Oct 22 02:03:44 PDT 2004
> Colin Walters [Thu, 21 Oct 2004]:
> On Thu, 2004-10-21 at 17:04 -0400, Havoc Pennington wrote:
> > Hi,
> >
> > On Tue, 2004-10-19 at 00:14 -0400, Colin Walters wrote:
> > > +
> > > + if (_dbus_transport_get_is_authenticated (transport) &&
> > > + _dbus_transport_get_is_connected (transport))
> > > + if (!_dbus_transport_recover_post_auth_data (transport))
> > > + return FALSE;
> >
> > Maybe we could put this in do_reading() and have it be:
> > if (!transport->unused_bytes_recovered)
> > if (!_dbus_transport_recover_post_auth_data (transport))
> > return FALSE;
> >
> > Slightly better? not sure.
> >
> > An alternative is to do this in handle_watch() and do_iteration() in
> > dbus-transport.c to avoid exporting this to the backends. I guess I
> > might lean that way a bit, if it's sufficient to solve the problem,
> > since it maintains the encapsulation.
>
> I don't see how to do it in dbus-transport.c.
How about doing it in _dbus_transport_get_is_authenticated ? Just
before the ->authenticated is set to TRUE ?
--
Olivier
-------------- next part --------------
--- dbus-transport.c.~1.41.~ 2004-08-10 05:07:00.000000000 +0200
+++ dbus-transport.c 2004-10-21 23:17:20.056170209 +0200
@@ -527,6 +527,9 @@
}
}
+ if (maybe_authenticated)
+ maybe_authenticated = recover_unused_bytes (transport);
+
transport->authenticated = maybe_authenticated;
return transport->authenticated;
More information about the dbus
mailing list