2012-09-12 [colin] 3.8.1cvs51
authorColin Leroy <colin@colino.net>
Wed, 12 Sep 2012 08:52:47 +0000 (08:52 +0000)
committerColin Leroy <colin@colino.net>
Wed, 12 Sep 2012 08:52:47 +0000 (08:52 +0000)
* src/compose.c
* src/mh.c
* src/common/ssl.c
* src/plugins/pgpcore/passphrase.c
Apply patches from bug #1961, "patches for
a couple of clang warnings":
- Check return codes
- Remove dead code

ChangeLog
PATCHSETS
configure.ac
src/common/ssl.c
src/compose.c
src/mh.c
src/plugins/pgpcore/passphrase.c

index ecbab7e..cbeb65e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2012-09-12 [colin]     3.8.1cvs51
+
+       * src/compose.c
+       * src/mh.c
+       * src/common/ssl.c
+       * src/plugins/pgpcore/passphrase.c
+               Apply patches from bug #1961, "patches for
+               a couple of clang warnings":
+               - Check return codes
+               - Remove dead code
+
 2012-09-12 [colin]     3.8.1cvs50
 
        * claws-mail.pc.in
index b5e84c4..5f6a5e9 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.115.2.254 -r 1.115.2.255 src/main.c;  ) > 3.8.1cvs48.patchset
 ( cvs diff -u -r 1.115.2.255 -r 1.115.2.256 src/main.c;  ) > 3.8.1cvs49.patchset
 ( cvs diff -u -r 1.1.2.3 -r 1.1.2.4 claws-mail.pc.in;  ) > 3.8.1cvs50.patchset
+( cvs diff -u -r 1.382.2.610 -r 1.382.2.611 src/compose.c;  cvs diff -u -r 1.79.2.75 -r 1.79.2.76 src/mh.c;  cvs diff -u -r 1.9.2.55 -r 1.9.2.56 src/common/ssl.c;  cvs diff -u -r 1.1.2.37 -r 1.1.2.38 src/plugins/pgpcore/passphrase.c;  ) > 3.8.1cvs51.patchset
index 6bcd31f..4417d09 100644 (file)
@@ -12,7 +12,7 @@ MINOR_VERSION=8
 MICRO_VERSION=1
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=50
+EXTRA_VERSION=51
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index c87ed43..8d3ce86 100644 (file)
@@ -316,7 +316,7 @@ gboolean ssl_init_socket_with_method(SockInfo *sockinfo, SSLMethod method)
 
        r = gnutls_certificate_verify_peers2(session, &status);
 
-       if (!ssl_certificate_check(cert, status, sockinfo->hostname, sockinfo->port)) {
+       if (r < 0 || !ssl_certificate_check(cert, status, sockinfo->hostname, sockinfo->port)) {
                gnutls_x509_crt_deinit(cert);
                gnutls_certificate_free_credentials(xcred);
                gnutls_deinit(session);
index 1580ac0..a5d57ac 100644 (file)
@@ -1807,11 +1807,6 @@ Compose *compose_forward(PrefsAccount *account, MsgInfo *msginfo,
                const gchar *body_fmt = NULL;
                MsgInfo *full_msginfo;
 
-               if (prefs_common.fw_quotefmt && *prefs_common.fw_quotefmt)
-                       body_fmt = gettext(prefs_common.fw_quotefmt);
-               else
-                       body_fmt = "";
-       
                full_msginfo = procmsg_msginfo_get_full_info(msginfo);
                if (!full_msginfo)
                        full_msginfo = procmsg_msginfo_copy(msginfo);
@@ -5897,6 +5892,8 @@ static gint compose_queue_sub(Compose *compose, gint *msgnum, FolderItem **item,
                                err |= (fprintf(fp, "X-Claws-Encrypt:%d\n", compose->use_encryption) < 0);
                                /* and if encdata was null, it means there's been a problem in 
                                 * key selection */
+                               if (err == TRUE)
+                                       g_warning("failed to write queue message");
                                lock = FALSE;
                                fclose(fp);
                                claws_unlink(tmp);
index d183063..c4a692b 100644 (file)
--- a/src/mh.c
+++ b/src/mh.c
@@ -465,7 +465,6 @@ static gint mh_copy_msgs(Folder *folder, FolderItem *dest, MsgInfoList *msglist,
        FolderItem *src = NULL;
        gchar *srcfile;
        gchar *destfile;
-       gint filemode = 0;
        FolderItemPrefs *prefs;
        MsgInfo *msginfo = NULL;
        MsgInfoList *cur = NULL;
@@ -574,11 +573,6 @@ static gint mh_copy_msgs(Folder *folder, FolderItem *dest, MsgInfoList *msglist,
                if (prefs && prefs->enable_folder_chmod && prefs->folder_chmod) {
                        if (chmod(destfile, prefs->folder_chmod) < 0)
                                FILE_OP_ERROR(destfile, "chmod");
-
-                       /* for mark file */
-                       filemode = prefs->folder_chmod;
-                       if (filemode & S_IRGRP) filemode |= S_IWGRP;
-                       if (filemode & S_IROTH) filemode |= S_IWOTH;
                }
                if (relation) {
                        if (g_hash_table_lookup(relation, msginfo) != NULL)
index 3ef77b1..cf94115 100644 (file)
@@ -58,8 +58,7 @@ static gint passphrase_deleted(GtkWidget *widget, GdkEventAny *event,
 static gboolean passphrase_key_pressed(GtkWidget *widget, GdkEventKey *event,
                                       gpointer data);
 
-static GtkWidget *create_description(const gchar *uid_hint,
-                                    const gchar *pass_hint, gint prev_bad, gint new_key);
+static GtkWidget *create_description(const gchar *uid_hint, gint prev_bad, gint new_key);
 
 void
 gpgmegtk_set_passphrase_grab(gint yes)
@@ -102,7 +101,7 @@ passphrase_mbox(const gchar *uid_hint, const gchar *pass_hint, gint prev_bad, gi
 
     if (uid_hint || pass_hint) {
         GtkWidget *label, *icon;
-        label = create_description (uid_hint, pass_hint, prev_bad, new_key);
+        label = create_description (uid_hint, prev_bad, new_key);
        icon = gtk_image_new_from_stock(GTK_STOCK_DIALOG_AUTHENTICATION,
                                GTK_ICON_SIZE_DIALOG); 
 
@@ -244,9 +243,9 @@ linelen (const gchar *s)
 }
 
 static GtkWidget *
-create_description(const gchar *uid_hint, const gchar *pass_hint, gint prev_bad, gint new_key)
+create_description(const gchar *uid_hint, gint prev_bad, gint new_key)
 {
-    const gchar *uid = NULL, *info = NULL;
+    const gchar *uid = NULL;
     gchar *buf;
     GtkWidget *label;
     gchar *my_uid = NULL;
@@ -254,10 +253,6 @@ create_description(const gchar *uid_hint, const gchar *pass_hint, gint prev_bad,
         uid = _("[no user id]");
     else
         uid = uid_hint;
-    if (!pass_hint)
-        info = "";
-    else
-        info = pass_hint;
 
     my_uid = g_strdup(uid);
     while (strchr(my_uid, '<'))