diff options
author | Radek Doulik <rodo@ximian.com> | 2004-01-22 23:27:20 +0800 |
---|---|---|
committer | Radek Doulik <rodo@src.gnome.org> | 2004-01-22 23:27:20 +0800 |
commit | 2ab7c5c3e21b45320d2062e82f5698204456f79a (patch) | |
tree | 1664fda866c5a20b4b5d1c480ae983e3944c1183 | |
parent | e933aaf985d6fba7719a8b87f58c439f77effa2e (diff) | |
download | gsoc2013-evolution-2ab7c5c3e21b45320d2062e82f5698204456f79a.tar.gz gsoc2013-evolution-2ab7c5c3e21b45320d2062e82f5698204456f79a.tar.zst gsoc2013-evolution-2ab7c5c3e21b45320d2062e82f5698204456f79a.zip |
uncomment system wide spamd test
2004-01-22 Radek Doulik <rodo@ximian.com>
* em-junk-filter.c (em_junk_sa_test_spamd): uncomment system wide
spamd test
2004-01-20 Radek Doulik <rodo@ximian.com>
* em-junk-filter.c: lock report calls by em_junk_sa_report_lock
mutex
svn path=/trunk/; revision=24364
-rw-r--r-- | mail/ChangeLog | 10 | ||||
-rw-r--r-- | mail/em-junk-filter.c | 29 |
2 files changed, 28 insertions, 11 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index a0f304c295..a910ba0b91 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,13 @@ +2004-01-22 Radek Doulik <rodo@ximian.com> + + * em-junk-filter.c (em_junk_sa_test_spamd): uncomment system wide + spamd test + +2004-01-20 Radek Doulik <rodo@ximian.com> + + * em-junk-filter.c: lock report calls by em_junk_sa_report_lock + mutex + 2004-01-21 Jeffrey Stedfast <fejj@ximian.com> * em-migrate.c (em_migrate_1_4): Migrate the ETree expanded state diff --git a/mail/em-junk-filter.c b/mail/em-junk-filter.c index 0491d58823..e07a31f8c4 100644 --- a/mail/em-junk-filter.c +++ b/mail/em-junk-filter.c @@ -39,6 +39,7 @@ #define UNLOCK(x) pthread_mutex_unlock(&x) static pthread_mutex_t em_junk_sa_test_lock = PTHREAD_MUTEX_INITIALIZER; +static pthread_mutex_t em_junk_sa_report_lock = PTHREAD_MUTEX_INITIALIZER; static const char * em_junk_sa_get_name (void); static gboolean em_junk_sa_check_junk (CamelMimeMessage *msg); @@ -201,19 +202,19 @@ em_junk_sa_test_spamd () em_junk_sa_available = TRUE; em_junk_sa_use_spamc = FALSE; - /* if (em_junk_sa_test_spamd_running (-1)) { - em_junk_sa_use_spamc = TRUE; - em_junk_sa_spamd_port = -1; - } else { */ - for (i = 0; i < NPORTS; i ++) { - if (em_junk_sa_test_spamd_running (port)) { - em_junk_sa_use_spamc = TRUE; - em_junk_sa_spamd_port = port; - break; + if (em_junk_sa_test_spamd_running (-1)) { + em_junk_sa_use_spamc = TRUE; + em_junk_sa_spamd_port = -1; + } else { + for (i = 0; i < NPORTS; i ++) { + if (em_junk_sa_test_spamd_running (port)) { + em_junk_sa_use_spamc = TRUE; + em_junk_sa_spamd_port = port; + break; + } + port ++; } - port ++; } - /* } */ if (!em_junk_sa_use_spamc) { static gchar *sad_args [4] = { @@ -316,7 +317,9 @@ em_junk_sa_report_junk (CamelMimeMessage *msg) " --single%s", /* single message */ mail_session_get_sa_local_only () ? " --local" : ""); /* local only */ + LOCK (em_junk_sa_report_lock); pipe_to_sa (msg, NULL, 3, args); + UNLOCK (em_junk_sa_report_lock); g_free (args [2]); } } @@ -341,7 +344,9 @@ em_junk_sa_report_notjunk (CamelMimeMessage *msg) " --single%s", /* single message */ mail_session_get_sa_local_only () ? " --local" : ""); /* local only */ + LOCK (em_junk_sa_report_lock); pipe_to_sa (msg, NULL, 3, args); + UNLOCK (em_junk_sa_report_lock); g_free (args [2]); } } @@ -364,7 +369,9 @@ em_junk_sa_commit_reports (void) " --rebuild%s", /* do not rebuild db */ mail_session_get_sa_local_only () ? " --local" : ""); /* local only */ + LOCK (em_junk_sa_report_lock); pipe_to_sa (NULL, NULL, 3, args); + UNLOCK (em_junk_sa_report_lock); g_free (args [2]); } } |