Re: GIOChannel subclassing in libsoup



Tor Lillqvist wrote:
> (I initially sent this to Dan Winship only, but I assume it is better
> to have technical discussion like this on the list.)

Oops, and I already replied to the personal mail, but you're right, so
here's the response, for the list:

--- Begin Message ---
Tor Lillqvist wrote:
> So, on Unix, calling one of the GIOFuncs functions of real_sock,
> passing it the SoupGNUTLSChannel, is not a problem, as to the
> functions in giounix.c, the SoupGNUTLSChannel will look and work just
> like a GIOUnixChannel.

Gah! I think that's just totally a bug. Eg, where it says:

    return chan->real_sock->funcs->io_seek (channel, offset, type, err);

it should really be

    return chan->real_sock->funcs->io_seek (chan->real_sock, offset,
type, err);

and it's simply a bizarre coincidence that it ever worked on unix. :-}

Does it work if you make that change in each of the broken methods?

BTW, the whole GIOChannel thing is entirely internel to SoupSocket and
soup-gnutls now, so if it's causing too many problems, it could be
replaced with something saner (eg, gio-based, where you're actually
*expected* to be subclassing things).

(And although the build system support isn't fully there any more, in
theory, it should be possible to have a separate implementation of the
soup-ssl.h interface for Windows, if there's some native SSL API...)

-- Dan


--- End Message ---


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]