aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins/bogo-junk-plugin/ChangeLog5
-rw-r--r--plugins/bogo-junk-plugin/bf-junk-filter.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/plugins/bogo-junk-plugin/ChangeLog b/plugins/bogo-junk-plugin/ChangeLog
index 4fc625aee7..0aec2b9e54 100644
--- a/plugins/bogo-junk-plugin/ChangeLog
+++ b/plugins/bogo-junk-plugin/ChangeLog
@@ -1,3 +1,8 @@
+2008-04-29 Milan Crha <mcrha@redhat.com>
+
+ * bf-junk-filter.c: (pipe_to_bogofilter):
+ Report errors properly. Thanks to Reid Thompson whom found it.
+
2008-04-25 Milan Crha <mcrha@redhat.com>
** Fix for bug #273041
diff --git a/plugins/bogo-junk-plugin/bf-junk-filter.c b/plugins/bogo-junk-plugin/bf-junk-filter.c
index 4cfbd5deca..a0d00c44d8 100644
--- a/plugins/bogo-junk-plugin/bf-junk-filter.c
+++ b/plugins/bogo-junk-plugin/bf-junk-filter.c
@@ -148,7 +148,7 @@ pipe_to_bogofilter (CamelMimeMessage *msg, gchar **argv, GError **error)
res = BOGOFILTER_ERROR;
}
- if (res != 0)
+ if (res < 0 || res > 2)
g_set_error (error, EM_JUNK_ERROR, res, _("Pipe to Bogofilter failed, error code: %d."), res);
return res;