[evolution-patches] [mailer+camel] #72184 Spam Checking is very loud
- From: Radek Doulík <rodo novell com>
- To: Patches <evolution-patches ximian com>
- Cc: Jeffrey Stedfast <fejj ximian com>, Not Zed <notzed ximian com>
- Subject: [evolution-patches] [mailer+camel] #72184 Spam Checking is very loud
- Date: Fri, 11 Feb 2005 16:49:06 +0100
Index: em-junk-filter.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/em-junk-filter.c,v
retrieving revision 1.26
diff -u -p -r1.26 em-junk-filter.c
--- em-junk-filter.c 1 Dec 2004 17:46:25 -0000 1.26
+++ em-junk-filter.c 11 Feb 2005 14:57:49 -0000
@@ -36,6 +36,7 @@
#include <signal.h>
#include <time.h>
+#include <camel/camel-debug.h>
#include <camel/camel-file-utils.h>
#include <camel/camel-data-wrapper.h>
#include <camel/camel-stream-fs.h>
@@ -48,7 +49,7 @@
#include <gconf/gconf-client.h>
-#define d(x) x
+#define d(x) (camel_debug("junk")?(x):0)
static pthread_mutex_t em_junk_sa_init_lock = PTHREAD_MUTEX_INITIALIZER;
static pthread_mutex_t em_junk_sa_report_lock = PTHREAD_MUTEX_INITIALIZER;
@@ -118,16 +119,15 @@ pipe_to_sa_full (CamelMimeMessage *msg,
char *program;
pid_t pid;
-#if d(!)0
- {
+
+ d({
int i;
printf ("pipe_to_sa ");
for (i = 0; argv[i]; i++)
printf ("%s ", argv[i]);
printf ("\n");
- }
-#endif
+ });
program = g_find_program_in_path (argv [0]);
if (program == NULL) {
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution-data-server/camel/ChangeLog,v
retrieving revision 1.2429
diff -u -p -r1.2429 ChangeLog
--- ChangeLog 7 Feb 2005 22:06:57 -0000 1.2429
+++ ChangeLog 11 Feb 2005 15:32:38 -0000
@@ -1,3 +1,9 @@
+2005-02-11 Radek Doulik <rodo novell com>
+
+ * camel-filter-search.c (junk_test): use camel debug
+
+ * camel-junk-plugin.c: use camel debug
+
2005-02-07 JP Rosevear <jpr novell com>
* camel-iconv.c: remove dead file
Index: camel-filter-search.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/camel/camel-filter-search.c,v
retrieving revision 1.50
diff -u -p -r1.50 camel-filter-search.c
--- camel-filter-search.c 4 Feb 2005 08:40:16 -0000 1.50
+++ camel-filter-search.c 11 Feb 2005 15:32:43 -0000
@@ -45,6 +45,7 @@
#include <libedataserver/e-sexp.h>
#include <libedataserver/e-iconv.h>
+#include "camel-debug.h"
#include "camel-mime-message.h"
#include "camel-provider.h"
#include "camel-session.h"
@@ -623,7 +624,8 @@ junk_test (struct _ESExp *f, int argc, s
if (fms->session->junk_plugin != NULL) {
retval = camel_junk_plugin_check_junk (fms->session->junk_plugin, camel_filter_search_get_message (fms, f));
- printf("junk filter => %s\n", retval ? "*JUNK*" : "clean");
+ if (camel_debug ("junk"))
+ printf("junk filter => %s\n", retval ? "*JUNK*" : "clean");
}
r = e_sexp_result_new (f, ESEXP_RES_BOOL);
Index: camel-junk-plugin.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/camel/camel-junk-plugin.c,v
retrieving revision 1.3
diff -u -p -r1.3 camel-junk-plugin.c
--- camel-junk-plugin.c 25 Nov 2004 10:50:11 -0000 1.3
+++ camel-junk-plugin.c 11 Feb 2005 15:32:50 -0000
@@ -22,17 +22,18 @@
#include <stdio.h>
#include <glib.h>
+#include <camel/camel-debug.h>
#include <camel/camel-junk-plugin.h>
#include <camel/camel-mime-message.h>
-#define d(x) x
+#define d(x) (camel_debug("junk")?(x):0)
const char *
camel_junk_plugin_get_name (CamelJunkPlugin *csp)
{
g_return_val_if_fail (csp->get_name != NULL, NULL);
- d(fprintf (stderr, "camel_junk_plugin_get_namen");)
+ d(fprintf (stderr, "camel_junk_plugin_get_namen"));
return (*csp->get_name) ();
}
@@ -42,7 +43,7 @@ camel_junk_plugin_check_junk (CamelJunkP
{
g_return_val_if_fail (csp->check_junk != NULL, FALSE);
- d(fprintf (stderr, "camel_junk_plugin_check_junk\n");)
+ d(fprintf (stderr, "camel_junk_plugin_check_junk\n"));
return (*csp->check_junk) (message);
}
@@ -50,7 +51,7 @@ camel_junk_plugin_check_junk (CamelJunkP
void
camel_junk_plugin_report_junk (CamelJunkPlugin *csp, CamelMimeMessage *message)
{
- d(fprintf (stderr, "camel_junk_plugin_report_junk\n");)
+ d(fprintf (stderr, "camel_junk_plugin_report_junk\n"));
if (csp->report_junk)
(*csp->report_junk) (message);
@@ -59,7 +60,7 @@ camel_junk_plugin_report_junk (CamelJunk
void
camel_junk_plugin_report_notjunk (CamelJunkPlugin *csp, CamelMimeMessage *message)
{
- d(fprintf (stderr, "camel_junk_plugin_report_notjunk\n");)
+ d(fprintf (stderr, "camel_junk_plugin_report_notjunk\n"));
if (csp->report_notjunk)
(*csp->report_notjunk) (message);
@@ -68,7 +69,7 @@ camel_junk_plugin_report_notjunk (CamelJ
void
camel_junk_plugin_commit_reports (CamelJunkPlugin *csp)
{
- d(fprintf (stderr, "camel_junk_plugin_commit_reports\n");)
+ d(fprintf (stderr, "camel_junk_plugin_commit_reports\n"));
if (csp->commit_reports)
(*csp->commit_reports) ();
@@ -77,7 +78,7 @@ camel_junk_plugin_commit_reports (CamelJ
void
camel_junk_plugin_init (CamelJunkPlugin *csp)
{
- d(fprintf (stderr, "camel_junk_plugin_init\n");)
+ d(fprintf (stderr, "camel_junk_plugin_init\n"));
if (csp->init)
(*csp->init) ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]