Re: GIOChannels, yet again



Zoran Rilak wrote:
Greetings developers,
[snip]
/* stderr */
GLib-CRITICAL **: file giochannel.c: line 1748
(g_io_channel_read_chars): assertion `channel->is_readable' failed
/* */

what's baffling me is the fact that just one line above the offending
g_io_channel_read_chars() I add a g_io_channel_get_flags() to refresh
the cache and then check if it's readable (it is), but the reading
function keeps screaming about channel not being readable.  What could
be the cause of this?

    Here is a guess, assuming that `channel->is_readable' has nothing
to do with the flags used to open the file descriptor in general
(because the GIOChannel probably has a `((channel)->flags & G_IO_IN)'
flag or something else for that purpose), maybe `g_io_channel_read_chars()'
assumes that there is data ready to be read at that point, maybe a boolean
variable was added to avoid performing a `poll'/`select' every time
g_io_channel_read_chars() gets called ?


Just a guess,
                                        -Tristan





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