2006-03-02 [wwp] 2.0.0cvs99
authorTristan Chabredier <wwp@claws-mail.org>
Thu, 2 Mar 2006 08:10:02 +0000 (08:10 +0000)
committerTristan Chabredier <wwp@claws-mail.org>
Thu, 2 Mar 2006 08:10:02 +0000 (08:10 +0000)
* src/plugins/spamassassin/spamassassin.c
make sync calls to sa-learn/spamc to prevent
system (whatever local or client/server) overload.

ChangeLog
PATCHSETS
configure.ac
src/plugins/spamassassin/spamassassin.c

index 45faa6f27cf54f3d85ad0746998cf6fb722d7712..bdd05393a7d8b7cda3d4e6e9e3ca2bb8986f63b0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2006-03-02 [wwp]       2.0.0cvs99
+
+       * src/plugins/spamassassin/spamassassin.c
+               make sync calls to sa-learn/spamc to prevent
+               system (whatever local or client/server) overload.
+
 2006-03-02 [colin]     2.0.0cvs98
 
        * src/summaryview.c
index 0b7bd80d910e5fcbd03daadc7d644e50a8920bb5..d104355327d0af0b13fdee582b476fb772ddfe30 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.149.2.45 -r 1.149.2.46 src/inc.c;  ) > 2.0.0cvs96.patchset
 ( cvs diff -u -r 1.18.2.28 -r 1.18.2.29 src/plugins/spamassassin/spamassassin.c;  ) > 2.0.0cvs97.patchset
 ( cvs diff -u -r 1.395.2.178 -r 1.395.2.179 src/summaryview.c;  ) > 2.0.0cvs98.patchset
+( cvs diff -u -r 1.18.2.29 -r 1.18.2.30 src/plugins/spamassassin/spamassassin.c;  ) > 2.0.0cvs99.patchset
index 560ec2cce58d21cbc2f4b6f1ec029549531b358b..d3df06c8c5f2da01f5ad46a38fe8e29d55aa6298 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=0
 MICRO_VERSION=0
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=98
+EXTRA_VERSION=99
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index e4c5f1772ba82fcaf24b9b28010a04ad83ac791f..f7762b47ae9944286e5536a5c6b4e01210564b20 100644 (file)
@@ -284,7 +284,6 @@ int spamassassin_learn(MsgInfo *msginfo, GSList *msglist, gboolean spam)
 {
        gchar *cmd = NULL;
        gchar *file = NULL;
-       gboolean async = FALSE;
        const gchar *shell = g_getenv("SHELL");
        gchar *spamc_wrapper = NULL;
 
@@ -338,7 +337,7 @@ int spamassassin_learn(MsgInfo *msginfo, GSList *msglist, gboolean spam)
                                        tmpcmd = g_strconcat(shell?shell:"sh", " ", spamc_wrapper, " ",
                                                                                tmpfile, NULL);
                                        debug_print("%s\n", tmpcmd);
-                                       execute_command_line(tmpcmd, TRUE);
+                                       execute_command_line(tmpcmd, FALSE);
                                        g_free(tmpcmd);
                                }
                                if (tmpfile != NULL) {
@@ -371,17 +370,14 @@ int spamassassin_learn(MsgInfo *msginfo, GSList *msglist, gboolean spam)
                                        g_free(tmpfile);
                                }
                        }
-                       async = TRUE;
                }
        }
        if (cmd == NULL) {
                return -1;
        }
        debug_print("%s\n", cmd);
-       /* only run async if we have a list, or we could end up
-        * forking lots of perl processes and bury the machine */
-       
-       execute_command_line(cmd, async);
+       /* only run sync calls to sa-learn/spamc to prevent system lockdown */
+       execute_command_line(cmd, FALSE);
        g_free(cmd);
        if (spamc_wrapper != NULL) {
                g_free(spamc_wrapper);