Re: decryption failed
- From: Peter Bloomfield <peterbloomfield bellsouth net>
- To: Balsa list <balsa-list gnome org>
- Subject: Re: decryption failed
- Date: Tue, 07 Jun 2005 13:02:29 +0000
On 06/07/2005 08:27:47 AM, Kacper Wysocki wrote:
[ snip ]
Fixes things for mutlipart/encrypted but not for openpgp-style
inline encrypted messages.
OK--that needed a separate patch--attached. Thanks for checking
the different options!
Peter
Index: libbalsa/gmime-part-rfc2440.c
===================================================================
RCS file: /cvs/gnome/balsa/libbalsa/gmime-part-rfc2440.c,v
retrieving revision 1.9
diff -u -r1.9 gmime-part-rfc2440.c
--- libbalsa/gmime-part-rfc2440.c 24 May 2005 13:09:06 -0000 1.9
+++ libbalsa/gmime-part-rfc2440.c 7 Jun 2005 12:56:48 -0000
@@ -274,6 +274,7 @@
GMimeDataWrapper * wrapper;
gint result;
gchar *headbuf = g_malloc0(1024);
+ GMimeStream *wrapper_stream;
g_return_val_if_fail(GMIME_IS_PART(part), -1);
g_return_val_if_fail(GMIME_IS_GPGME_CONTEXT(ctx), -1);
@@ -282,12 +283,17 @@
/* get the raw content */
wrapper = g_mime_part_get_content_object(part);
+ wrapper_stream = g_mime_data_wrapper_get_stream(wrapper);
+ libbalsa_mime_stream_shared_lock(wrapper_stream);
stream = g_mime_stream_mem_new();
g_mime_data_wrapper_write_to_stream(wrapper, stream);
+ libbalsa_mime_stream_shared_unlock(wrapper_stream);
+ g_object_unref(wrapper_stream);
+ g_object_unref(wrapper);
+
g_mime_stream_reset(stream);
g_mime_stream_read(stream, headbuf, 1023);
g_mime_stream_reset(stream);
- g_object_unref(wrapper);
/* construct the stream for the decrypted output */
plainstream = g_mime_stream_mem_new();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]