Oops, don't use the return value of iconv() as a string length, it only
authorJeffrey Stedfast <fejj@ximian.com>
Mon, 23 Apr 2001 00:20:19 +0000 (00:20 +0000)
committerJeffrey Stedfast <fejj@src.gnome.org>
Mon, 23 Apr 2001 00:20:19 +0000 (00:20 +0000)
2001-04-22  Jeffrey Stedfast  <fejj@ximian.com>

* camel-pgp-context.c (pgp_verify): Oops, don't use the return
value of iconv() as a string length, it only tells us the number
of non-reversable character conversions. This fixes it so we
actually see the gpg output in the message viewer.

camel/ChangeLog
camel/camel-pgp-context.c
camel/camel-smime-context.c

index 66e141e..19781f5 100644 (file)
@@ -1,3 +1,10 @@
+2001-04-22  Jeffrey Stedfast  <fejj@ximian.com>
+
+       * camel-pgp-context.c (pgp_verify): Oops, don't use the return
+       value of iconv() as a string length, it only tells us the number
+       of non-reversable character conversions. This fixes it so we
+       actually see the gpg output in the message viewer.
+
 2001-04-23  Mikael Hallendal  <micke@codefactory.se>
 
        * providers/nntp/Makefile.am (INCLUDES): 
index cd3a7be..f69efde 100644 (file)
@@ -984,13 +984,12 @@ pgp_verify (CamelCipherContext *ctx, CamelStream *istream,
                g_free (locale);
                if (cd != (iconv_t) -1) {
                        const char *inbuf;
-                       size_t len;
                        
                        inbuf = diagnostics;
-                       len = iconv (cd, &inbuf, &inlen, &outbuf, &outlen);
+                       iconv (cd, &inbuf, &inlen, &outbuf, &outlen);
                        iconv_close (cd);
                        
-                       desc[len] = '\0';
+                       *outbuf = '\0';
                } else {
                        const char *inptr, *inend;
                        unicode_char_t c;
index b1d9fb2..703a29b 100644 (file)
@@ -32,6 +32,7 @@
 #include <nss.h>
 #include <cert.h>
 #include <secpkcs7.h>
+#include <secmime.h>
 
 #include <gtk/gtk.h> /* for _() macro */