Re: g_io_channel_read_to_end read just 998 chars, not more



> What system, what version of glib?
Ubuntu 9.10 64 bits, Kernel: 2.6.31-17-generic. Glib version is 2.22.3

> Why don't you test the error returns?
GError *b = NULL;

g_io_channel_read_to_end( channel, &string, &size, &b);

g_print("returned: %s\nsize: %d\nerror: %s", string, size, b->message);

It causes segmentation fault. What I'm doing wrong here?

2010/5/27 Lex Trotman <elextr gmail com>:
> On 27 May 2010 21:59, frederico schardong <frede sch gmail com> wrote:
>> Hi all,
>>
>> I'm reading a string from a GIOChannel, I'm using
>> g_io_channel_read_to_end to read it, but it read just 998 chars, is
>> there a function limitation or what?
>>
> What system, what version of glib?
>
>> g_io_channel_read_to_end( channel, &string, &size, NULL );
>
> Why don't you test the error returns?
>
> Cheers
> Lex
>
>> g_print("returned: %s\nsize: %d", string, size);
>>
>> --
>> Thanks,
>> Frederico Schardong,
>> SOLIS - Open source solutions
>> www.solis.coop.br
>> Linux registered user #500582
>> _______________________________________________
>> gtk-list mailing list
>> gtk-list gnome org
>> http://mail.gnome.org/mailman/listinfo/gtk-list
>>
>



-- 
Thanks,
Frederico Schardong,
SOLIS - Open source solutions
www.solis.coop.br
Linux registered user #500582


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