Re: [gmime-devel] GMimeFilterHTML: ignoring URL at the end of part?
- From: Gaute Hope <eg gaute vetsj com>
- To: Jeffrey Stedfast <fejj gnome org>, gmime-devel-list gnome org
- Subject: Re: [gmime-devel] GMimeFilterHTML: ignoring URL at the end of part?
- Date: Sat, 24 Oct 2015 13:19:38 +0000
Jeffrey Stedfast writes on May 29, 2015 13:02:
Hi Gaute,
On 5/29/2015 3:51 AM, Gaute Hope wrote:
Excerpts from Jeffrey Stedfast's message of April 10, 2015 16:06:
Hi Gaute,
Just to rule out gmime_iostream.cc, can you write a simple program to do
this?
char buffer[4096];
ssize_t n;
while ((n = g_mime_stream_read (filtered_stream, buffer, 4096) > 0)
write (1, buffer, n);
Hi,
I just encountered a variation of the case where the same issue occured,
a test case email follows below. I had to change the above line to:
while ((n = g_mime_stream_read (content_stream, buffer, 4096), n) >= 0)
write (1, buffer, n);
that is; to also continue on 0 bytes read. According to the reference
-1 should be returned on failure. Am I overseeing something or can I use
it like this?
Oops, yea, the >= is correct. When you get 0 bytes, it tells the filter
to flush internal state.
Ran into another corner-case here, if the mime-object is a decrypted
(gpg) email I do not get a -1, but keep getting 0. I have to check if I
have received 0 twice and then stop.
Regards, Gaute
[Date Prev][Date Next] [Thread Prev][Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]