2006-09-25 [colin] 2.5.0cvs3
authorColin Leroy <colin@colino.net>
Mon, 25 Sep 2006 21:31:38 +0000 (21:31 +0000)
committerColin Leroy <colin@colino.net>
Mon, 25 Sep 2006 21:31:38 +0000 (21:31 +0000)
* src/plugins/bogofilter/bogofilter.c
* src/plugins/clamav/clamav_plugin.c
* src/plugins/spamassassin/spamassassin.c
BogoFilter, Spamassassin: Fix double hook registering after
visiting preferences
Spamassassin, Clamav: Just set the mails to move instead of
doing the move - caller will move the things at once.

ChangeLog
PATCHSETS
configure.ac
src/plugins/bogofilter/bogofilter.c
src/plugins/clamav/clamav_plugin.c
src/plugins/spamassassin/spamassassin.c

index 4a3cc90..d078f2e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2006-09-25 [colin]     2.5.0cvs3
+
+       * src/plugins/bogofilter/bogofilter.c
+       * src/plugins/clamav/clamav_plugin.c
+       * src/plugins/spamassassin/spamassassin.c
+               BogoFilter, Spamassassin: Fix double hook registering after
+               visiting preferences
+               Spamassassin, Clamav: Just set the mails to move instead of
+               doing the move - caller will move the things at once.
+
 2006-09-25 [colin]     2.5.0cvs2
 
        * src/imap.c
index 99c1df9..3b8b48d 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.9.2.7 -r 1.9.2.8 po/cs.po;  cvs diff -u -r 1.58.2.24 -r 1.58.2.25 po/de.po;  cvs diff -u -r 1.1.2.10 -r 1.1.2.11 po/fi.po;  cvs diff -u -r 1.42.2.26 -r 1.42.2.27 po/fr.po;  cvs diff -u -r 1.28.2.7 -r 1.28.2.8 po/nl.po;  cvs diff -u -r 1.50.2.20 -r 1.50.2.21 po/pt_BR.po;  cvs diff -u -r 1.2.2.20 -r 1.2.2.21 po/sk.po;  cvs diff -u -r 1.17.2.23 -r 1.17.2.24 po/sr.po;  cvs diff -u -r 1.5.2.18 -r 1.5.2.19 po/zh_CN.po;  ) > 2.4.0cvs214.patchset
 ( cvs diff -u -r 1.3.12.16 -r 1.3.12.17 src/message_search.c;  ) > 2.5.0cvs1.patchset
 ( cvs diff -u -r 1.179.2.131 -r 1.179.2.132 src/imap.c;  cvs diff -u -r 1.1.4.51 -r 1.1.4.52 src/etpan/imap-thread.c;  ) > 2.5.0cvs2.patchset
+( cvs diff -u -r 1.1.2.9 -r 1.1.2.10 src/plugins/bogofilter/bogofilter.c;  cvs diff -u -r 1.13.2.24 -r 1.13.2.25 src/plugins/clamav/clamav_plugin.c;  cvs diff -u -r 1.18.2.41 -r 1.18.2.42 src/plugins/spamassassin/spamassassin.c;  ) > 2.5.0cvs3.patchset
index 804ca6c..06065ef 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=5
 MICRO_VERSION=0
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=2
+EXTRA_VERSION=3
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index f1e99c1..e87523d 100644 (file)
@@ -574,7 +574,8 @@ struct PluginFeature *plugin_provides(void)
 
 void bogofilter_register_hook(void)
 {
-       hook_id = hooks_register_hook(MAIL_LISTFILTERING_HOOKLIST, mail_filtering_hook, NULL);
+       if (hook_id == -1)
+               hook_id = hooks_register_hook(MAIL_LISTFILTERING_HOOKLIST, mail_filtering_hook, NULL);
        if (hook_id == -1) {
                g_warning("Failed to register mail filtering hook");
                config.process_emails = FALSE;
@@ -586,4 +587,5 @@ void bogofilter_unregister_hook(void)
        if (hook_id != -1) {
                hooks_unregister_hook(MAIL_LISTFILTERING_HOOKLIST, hook_id);
        }
+       hook_id = -1;
 }
index d45c7fc..cc42332 100644 (file)
@@ -141,7 +141,8 @@ static gboolean mail_filtering_hook(gpointer source, gpointer data)
                                    clamav_save_folder = folder_get_default_trash();
 
                        procmsg_msginfo_unset_flags(msginfo, ~0, 0);
-                       folder_item_move_msg(clamav_save_folder, msginfo);
+                       msginfo->is_move = TRUE;
+                       msginfo->to_filter_folder = clamav_save_folder;
                } else {
                        folder_item_remove_msg(msginfo->folder, msginfo->msgnum);
                }
index 94da2be..d698045 100644 (file)
@@ -259,7 +259,8 @@ static gboolean mail_filtering_hook(gpointer source, gpointer data)
 
                        procmsg_msginfo_unset_flags(msginfo, ~0, 0);
                        procmsg_msginfo_set_flags(msginfo, MSG_SPAM, 0);
-                       folder_item_move_msg(save_folder, msginfo);
+                       msginfo->is_move = TRUE;
+                       msginfo->to_filter_folder = save_folder;
                } else {
                        folder_item_remove_msg(msginfo->folder, msginfo->msgnum);
                }
@@ -563,7 +564,8 @@ struct PluginFeature *plugin_provides(void)
 
 void spamassassin_register_hook(void)
 {
-       hook_id = hooks_register_hook(MAIL_FILTERING_HOOKLIST, mail_filtering_hook, NULL);
+       if (hook_id == -1)
+               hook_id = hooks_register_hook(MAIL_FILTERING_HOOKLIST, mail_filtering_hook, NULL);
        if (hook_id == -1) {
                g_warning("Failed to register mail filtering hook");
                config.process_emails = FALSE;
@@ -575,4 +577,5 @@ void spamassassin_unregister_hook(void)
        if (hook_id != -1) {
                hooks_unregister_hook(MAIL_FILTERING_HOOKLIST, hook_id);
        }
+       hook_id = -1;
 }