GNOME Bugzilla – Bug 423951
GMime 2.2.4 and 2.2.5 -- g_mime_stream_reset() on GMimeStreamFile not working correctly
Last modified: 2007-03-29 14:07:52 UTC
Please describe the problem: Jeffrey Stedfast knows about this bug already, but I am creating a ticket anyway for completeness. Basically g_mime_stream_reset() doesn't reset the stream position, leading to streams basically having no data in them after using them to completion and then calling reset. Steps to reproduce: 1. Use a GMimeStreamFile, read it till the end. 2. reset the stream 3. Not able to read data anymore (stream acts like eof) (Note I am going on Jeff's description of the bug and not actualy experience) Actual results: Can't read anymore data from stream -- it's EOFd. Expected results: File position should be at zero and should be able to read data. Does this happen every time? Yes. Other information: Nope.
PS: My description of how to reproduce this bug might not be entirely correct -- I created this ticket at Jeff's behest..
PPS: I think it requires you to actually open the stream with g_mime_stream_*_new_with_bounds(), or g_mime_stream_substream() with a nonzero start in order to trigger the bug.
comment #2 would be correct :) streams with beginning offset of 0 were fine because lseek() or fseek() (depending on the file stream backing) would obviously return 0 for: lseek (fd, start, SEEK_SET); anyways, this is now fixed in the emergency 2.2.6 release