/*
* Claws Mail -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2015 Hiroyuki Yamamoto & The Claws Mail Team
+ * Copyright (C) 1999-2020 the Claws Mail Team and Hiroyuki Yamamoto
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
AddressBookFile *abf = NULL;
ItemFolder *folder = NULL;
#endif
- gchar *buf;
- Header *header;
+ gchar *buf = NULL;
+ Header *header = NULL;
gint errors = 0;
#ifndef USE_ALT_ADDRBOOK
path = action->destination;
start_address_completion(path);
- address_list = address_list_append(address_list, header->body);
+ address_list = g_slist_append(address_list, header->body);
for (walk = address_list; walk != NULL; walk = walk->next) {
gchar *stripped_addr = g_strdup(walk->data);
extract_address(stripped_addr);
if (complete_matches_found(walk->data) == 0) {
gchar *name = procheader_get_fromname(walk->data);
- debug_print("adding address '%s' to addressbook '%s'\n",
- stripped_addr, action->destination);
+ debug_print("adding '%s <%s>' to addressbook '%s'\n",
+ name, stripped_addr, action->destination);
#ifndef USE_ALT_ADDRBOOK
if (!addrbook_add_contact(abf, folder, name, stripped_addr, NULL)) {
#else
case MATCHACTION_MOVE:
case MATCHACTION_DELETE:
case MATCHACTION_STOP:
- case MATCHACTION_MARK_AS_SPAM:
return TRUE; /* MsgInfo invalid for message */
default:
return FALSE;
}
}
+gboolean processing_enabled(GSList *filtering_list)
+{
+ GSList *l;
+ for (l = filtering_list; l != NULL; l = g_slist_next(l)) {
+ FilteringProp * filtering = (FilteringProp *) l->data;
+ if (filtering->enabled)
+ return TRUE;
+ }
+ return FALSE;
+}
+
static gboolean filter_msginfo(GSList * filtering_list, MsgInfo * info, PrefsAccount* ac_prefs)
{
GSList *l;
if (prefs_common.enable_filtering_debug) {
gchar *tmp = _("undetermined");
-#ifndef G_OS_WIN32
+
switch (context) {
case FILTERING_INCORPORATION:
tmp = _("incorporation");
debug_filtering_session = FALSE;
break;
}
-#else
- debug_filtering_session = FALSE;
-#endif
+
if (debug_filtering_session) {
gchar *file = procmsg_get_message_file_path(info);
gchar *spc = g_strnfill(LOG_TIME_LEN + 1, ' ');
while (prefs_filtering != NULL) {
FilteringProp * filtering = (FilteringProp *)
prefs_filtering->data;
- filteringprop_free(filtering);
prefs_filtering = g_slist_remove(prefs_filtering, filtering);
+ filteringprop_free(filtering);
}
}