Re: Watch not working correctly since linc 0.1.12
- From: Michael Meeks <michael ximian com>
- To: orbit-list gnome org
- Subject: Re: Watch not working correctly since linc 0.1.12
- Date: 10 Jan 2002 12:13:02 +0000
Hi Roland,
On Thu, 2002-01-10 at 11:51, Roland Juelich wrote:
> I use a LincWatch in my application to handle messages on channels others than
> the CORBA connection. This worked fine with linc-0.1.11. Now, with linc-0.1.12
> and linc-0.1.13, I got a core dump in the handler routine, if a message was
> available on the channel, because the GIOChannel parameter in that handler is
> NULL.
Ah - oh dear. I'm sorry about that.
The problem that neccessitated the change was part of the linc API
re-hash to do non-blocking IO. The GSource / GIOChannel API is
hopelessly inefficient for changing what you want to poll on quickly, so
I implemented our own GSource - which we use directly instead of setting
up a GIOChannel.
> A look into the sources gives, that the channel given in linc_io_add_watch() is
> silently thrown away and not transfered to glib. Was that intended?
Yep - the channel is discarded, we just pull the fd out of it; but it
should still work; that is unless you were counting on a custom
GIOChannel to give you some exotic behavior - hmm.
> In my application, I may use the file descriptor directly to read the channel.
> If that is what you want, you probably should make the new
> linc_io_add_watch_fd() public instead of linc_io_add_watch().
Yes; that's true - however we are in an API freeze, personally I would
just whack that prototype in a header of your choosing in your project
if you want to use that API - I can't see it changing anytime soon.
Or just create a throwaway GIOChannel to pass the fd to the public
add_watch API.
Were you using g_io_channel to do anything useful ? alternatively of
course, you could hack up a patch to ensure that the GIOChannel gets set
on the source to whatever value is passed in or NULL - how does that
sound ? I'd be happy to commit that. Perhaps that solves your problem
more elegantly.
Apologies for the loss of service :-)
Regards,
Michael.
--
mmeeks@gnu.org <><, Pseudo Engineer, itinerant idiot
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]