Fix 'add_to_addressbook' filtering action to correctly add the name.
authorAndrej Kacian <ticho@claws-mail.org>
Sat, 15 Apr 2017 17:41:48 +0000 (19:41 +0200)
committerAndrej Kacian <ticho@claws-mail.org>
Sat, 15 Apr 2017 17:43:03 +0000 (19:43 +0200)
src/filtering.c

index e4f3d01..05cef1d 100644 (file)
@@ -510,15 +510,15 @@ static gboolean filteringaction_apply(FilteringAction * action, MsgInfo * info)
                                        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