12 Jun 2002 fejj   » (Master)

bdodson: ouch, that sucks. I would have to say that a lot of Freshmeat projects are Linux-specific, so only allowing "Unix" applications sounds like BS to me.

GMime: Wow, someone actually found a bug in GMime 0.9.0 today. If you feed a non-seekable stream to the parser, the resultant GMimeMessage or GMimePart object would contain an invalid stream object as its content so writing it out would cause it to segfault.

The fix was to make the parser check to see if the stream was seekable when parsing mime part contents into the GMimePart objects and cache the content in a memory buffer if the source stream is not seekable. This had actually been on my TODO list, but I had forgotten that I had any non-seekable streams. My TODO had actually been to move the seek/tell methods into a new abstract stream class or else find some other way of defining whether or not a stream was seekable. Currently the best you can do is see if g_mime_stream_tell() returns -1, but as you may have guessed - this could just mean there was an error. Of course, I suppose that as far as the parser cares, if tell() fails but read()s work, then the stream should be considered non-seekable and just go on with parsing anyway - so this mostly just works out. Maybe I don't need a GMimeSeekableStream abstraction afterall...

Latest blog entries     Older blog entries

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!