Re: g_io_channel and UDP sockets

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

 



Hi,

Jeff Abrahamson <jeff@xxxxxxxxxx> 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
_______________________________________________

gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux