[Commits] [SCM] claws branch, master, updated. 3.19.0-9-ge399ec485

wwp at claws-mail.org wwp at claws-mail.org
Wed Apr 13 10:46:40 UTC 2022


The branch, master has been updated
       via  e399ec485064c3720d723ebb874f7ac9e3704266 (commit)
      from  1445df7021764ede5cea62338e3724726006c413 (commit)

Summary of changes:
 src/plugins/address_keeper/address_keeper.c | 62 ++++++++++++++---------------
 1 file changed, 31 insertions(+), 31 deletions(-)


- Log -----------------------------------------------------------------
commit e399ec485064c3720d723ebb874f7ac9e3704266
Author: wwp <subscript at free.fr>
Date:   Wed Apr 13 12:45:11 2022 +0200

    Fix address keeper plug-in not saving addresses: revert wrong changes to the logic done by 0391e584a2e44338bc19e589c727cd6a9bde2e66.

diff --git a/src/plugins/address_keeper/address_keeper.c b/src/plugins/address_keeper/address_keeper.c
index b8cf0a63b..a5aab85a4 100644
--- a/src/plugins/address_keeper/address_keeper.c
+++ b/src/plugins/address_keeper/address_keeper.c
@@ -196,39 +196,39 @@ static gboolean addrk_before_send_hook(gpointer source, gpointer data)
 	if (addkeeperprefs.block_matching_addrs != NULL
 			&& addkeeperprefs.block_matching_addrs[0] != '\0') {
 		blocked = matcherlist_new_from_lines(addkeeperprefs.block_matching_addrs, FALSE, FALSE);
-
-		if (blocked) {
-			for (cur = compose->header_list; cur != NULL; cur = cur->next) {
-				gchar *header;
-				gchar *entry;
-				header = gtk_editable_get_chars(GTK_EDITABLE(
-						gtk_bin_get_child(GTK_BIN(
-							(((ComposeHeaderEntry *)cur->data)->combo)))), 0, -1);
-				entry = gtk_editable_get_chars(GTK_EDITABLE(
-						((ComposeHeaderEntry *)cur->data)->entry), 0, -1);
-				g_strstrip(entry);
-				g_strstrip(header);
-				if (*entry != '\0') {
-					if (!g_ascii_strcasecmp(header, to_hdr)
-						&& addkeeperprefs.keep_to_addrs == TRUE) {
-						keep_if_unknown(abf, folder, entry, blocked);
-					}
-					if (!g_ascii_strcasecmp(header, cc_hdr)
-						&& addkeeperprefs.keep_cc_addrs == TRUE) {
-						keep_if_unknown(abf, folder, entry, blocked);
-					}
-					if (!g_ascii_strcasecmp(header, bcc_hdr)
-						&& addkeeperprefs.keep_bcc_addrs == TRUE) {
-						keep_if_unknown(abf, folder, entry, blocked);
-					}
-				}
-				g_free(header);
-				g_free(entry);
-			}
-			matcherlist_free(blocked);
-		} else
+		if (blocked == NULL)
 			g_warning("couldn't allocate matcher");
 	}
+	for (cur = compose->header_list; cur != NULL; cur = cur->next) {
+		gchar *header;
+		gchar *entry;
+		header = gtk_editable_get_chars(GTK_EDITABLE(
+				gtk_bin_get_child(GTK_BIN(
+					(((ComposeHeaderEntry *)cur->data)->combo)))), 0, -1);
+		entry = gtk_editable_get_chars(GTK_EDITABLE(
+				((ComposeHeaderEntry *)cur->data)->entry), 0, -1);
+		g_strstrip(entry);
+		g_strstrip(header);
+		if (*entry != '\0') {
+			if (!g_ascii_strcasecmp(header, to_hdr)
+				&& addkeeperprefs.keep_to_addrs == TRUE) {
+				keep_if_unknown(abf, folder, entry, blocked);
+			}
+			if (!g_ascii_strcasecmp(header, cc_hdr)
+				&& addkeeperprefs.keep_cc_addrs == TRUE) {
+				keep_if_unknown(abf, folder, entry, blocked);
+			}
+			if (!g_ascii_strcasecmp(header, bcc_hdr)
+				&& addkeeperprefs.keep_bcc_addrs == TRUE) {
+				keep_if_unknown(abf, folder, entry, blocked);
+			}
+		}
+		g_free(header);
+		g_free(entry);
+	}
+	if (blocked != NULL)	
+		matcherlist_free(blocked);
+
 	return FALSE;	/* continue sending */
 }
 

-----------------------------------------------------------------------


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list