diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2012-10-16 23:24:06 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2012-10-16 23:24:06 +0800 |
commit | d84ba383ac994cbebd3976c9d747e04e79e953ff (patch) | |
tree | 1138ac0587ae719c8d8b1a6d987edededd6b534c /modules/bogofilter/evolution-bogofilter.c | |
parent | ab873378afd4f103e068ff5b659f4b29bb50fb25 (diff) | |
download | gsoc2013-evolution-d84ba383ac994cbebd3976c9d747e04e79e953ff.tar gsoc2013-evolution-d84ba383ac994cbebd3976c9d747e04e79e953ff.tar.gz gsoc2013-evolution-d84ba383ac994cbebd3976c9d747e04e79e953ff.tar.bz2 gsoc2013-evolution-d84ba383ac994cbebd3976c9d747e04e79e953ff.tar.lz gsoc2013-evolution-d84ba383ac994cbebd3976c9d747e04e79e953ff.tar.xz gsoc2013-evolution-d84ba383ac994cbebd3976c9d747e04e79e953ff.tar.zst gsoc2013-evolution-d84ba383ac994cbebd3976c9d747e04e79e953ff.zip |
Adapt to CamelJunkFilter API changes.
Diffstat (limited to 'modules/bogofilter/evolution-bogofilter.c')
-rw-r--r-- | modules/bogofilter/evolution-bogofilter.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/modules/bogofilter/evolution-bogofilter.c b/modules/bogofilter/evolution-bogofilter.c index 2056f4f11a..00bb763151 100644 --- a/modules/bogofilter/evolution-bogofilter.c +++ b/modules/bogofilter/evolution-bogofilter.c @@ -328,15 +328,15 @@ bogofilter_new_config_widget (EMailJunkFilter *junk_filter) return box; } -static gboolean +static CamelJunkStatus bogofilter_classify (CamelJunkFilter *junk_filter, CamelMimeMessage *message, - CamelJunkStatus *status, GCancellable *cancellable, GError **error) { EBogofilter *extension = E_BOGOFILTER (junk_filter); static gboolean wordlist_initialized = FALSE; + CamelJunkStatus status; gint exit_code; const gchar *argv[] = { @@ -353,18 +353,19 @@ retry: switch (exit_code) { case BOGOFILTER_EXIT_STATUS_SPAM: - *status = CAMEL_JUNK_STATUS_MESSAGE_IS_JUNK; + status = CAMEL_JUNK_STATUS_MESSAGE_IS_JUNK; break; case BOGOFILTER_EXIT_STATUS_HAM: - *status = CAMEL_JUNK_STATUS_MESSAGE_IS_NOT_JUNK; + status = CAMEL_JUNK_STATUS_MESSAGE_IS_NOT_JUNK; break; case BOGOFILTER_EXIT_STATUS_UNSURE: - *status = CAMEL_JUNK_STATUS_INCONCLUSIVE; + status = CAMEL_JUNK_STATUS_INCONCLUSIVE; break; case BOGOFILTER_EXIT_STATUS_ERROR: + status = CAMEL_JUNK_STATUS_ERROR; if (!wordlist_initialized) { wordlist_initialized = TRUE; bogofilter_init_wordlist (extension); @@ -380,12 +381,12 @@ retry: } /* Check that the return value and GError agree. */ - if (exit_code != BOGOFILTER_EXIT_STATUS_ERROR) + if (status != CAMEL_JUNK_STATUS_ERROR) g_warn_if_fail (error == NULL || *error == NULL); else g_warn_if_fail (error == NULL || *error != NULL); - return (exit_code != BOGOFILTER_EXIT_STATUS_ERROR); + return status; } static gboolean |