Re: g_io_channel and UDP sockets
- From: Sven Neumann <sven gimp org>
- To: Jeff Abrahamson <jeff purple com>
- Cc: gtk-list gnome org
- Subject: Re: g_io_channel and UDP sockets
- Date: 24 Feb 2004 20:07:11 +0100
Hi,
Jeff Abrahamson <jeff purple com> writes:
> Setting the encoding unfortunately just gives me a different error
> stream. Now I see an infinite stream of these:
>
> (process:12739): GLib-CRITICAL **: file giochannel.c: line 1662 (g_io_channel_read_to_end): assertion `(error == NULL) || (*error == NULL)' failed
>
> I get this by calling
>
> GError *err;
> iostat = g_io_channel_read_to_end(source, &str_return, &length, &err);
Read the docs on GError, you need to initialize the err variable to NULL.
> I note that in blib you do the same work-around I had settled on:
>
> req_fd = g_io_channel_unix_get_fd (io);
> buf_read = recvfrom (req_fd, buf, sizeof (buf), 0,
> (struct sockaddr *) &req_addr, &req_addr_length);
I don't see this as a workaround.
Sven
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]