Re: Question about TnyVfsStream



On Sat, Mar 15, 2008 at 02:02:16AM +0100, Philip Van Hoof wrote:

> > > > In tny_vfs_seek() shouldn't we set priv->position = 0 after a
> > > > successful seek ?
> > I meant in tny_vfs_reset(), sorry
> 
> Only if the GnomeVFS handle's position is actually set to 0 too,
> else reset should return -1 and the existing position should remain.

Exactly, that's why I said "after a successful seek". This is the
code:


res = gnome_vfs_seek (priv->handle, GNOME_VFS_SEEK_START, 0);

if (res != GNOME_VFS_OK)
{
	tny_vfs_stream_set_errno (res);
	retval = -1;
}
priv->eos = FALSE;

return retval;


Here, priv->position is never modified, not even if gnome_vfs_seek()
returns GNOME_VFS_OK, that's why it looks wrong (I don't have any bug
caused by this BTW, I just noticed it when I was debugging another
thing).

-- 
Alberto García González
http://people.igalia.com/berto/


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