Re: [gmime-devel] issue with g_mime_multipart_encrypted_decrypt / fsync



On 7/22/2012 11:04 AM, Dirk-Jan C. Binnema wrote:
Hi all,

I'm trying to use g_mime_multipart_encrypted_decrypt in my app[1], but
it keeps returning NULL without 'err' being set. I'm using GMime 2.6.x

I've debugged this to the function stream_flush in gmime-stream-pipe.c,
where `fsync' returns -1, with errno set to EINVAL. This is called from
gmime-gpg-context.c, around line 1194:
       if (g_mime_stream_flush (passwd) == -1)

Maybe fsync on a pipe is not allowed?

Hmmm, this is possible. I'll look into it. Is this on Linux? Or some other system?


In any case, once I commented out the fsync, things started working.

While debugging this, I found something else, which is probably not
related, but may be worthwhile to :

In http://git.gnome.org/browse/gmime/tree/gmime/gmime-gpg-context.c#n388,
there's a check for UTF8, using string "UTF-8". However, on my
(Debian/sid) system, the locale is "utf8", and thus gmime doesn't
recognize to fix. So, maybe the check should include that as well?

I've fixed this in git, but it shouldn't have caused any issues (it'd just open a charset converter for UTF-8 to UTF-8 and so might have done some extra processing, but it should have been extremely cheap).

Jeff



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