[patch] the most horrible patch ever
Colin Walters
walters at verbum.org
Thu Oct 21 17:20:00 PDT 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. The problem is purely
inside dbus-transport-unix.c:unix_handle_watch:
if (!do_authentication (transport, TRUE, FALSE))
return FALSE;
if (!do_reading (transport))
Between there we need to do something. If this was GObject, I'd say to
have a signal on the auth module so that it can emit "auth-done", and
the transport can then shove the initial auth data into the loader.
Your suggestion of putting it in do_reading should work; we still need a
check for is_authenticated somewhere though, right? So that the very
first data we read (the initial auth conversation) isn't put into the
loader.
-------------- 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://freedesktop.org/pipermail/dbus/attachments/20041021/d2e22605/attachment.pgp
More information about the dbus
mailing list