aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-filter-search.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2001-09-14 09:44:18 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2001-09-14 09:44:18 +0800
commit0676d2890e8def5d8876da6784df4e673b0703a1 (patch)
treee8eefa6b292df016f38d82f2a6f96ad1af966cdf /camel/camel-filter-search.c
parentc109102df34ceb19c72fbc8c410c9ec158c6b3a5 (diff)
downloadgsoc2013-evolution-0676d2890e8def5d8876da6784df4e673b0703a1.tar
gsoc2013-evolution-0676d2890e8def5d8876da6784df4e673b0703a1.tar.gz
gsoc2013-evolution-0676d2890e8def5d8876da6784df4e673b0703a1.tar.bz2
gsoc2013-evolution-0676d2890e8def5d8876da6784df4e673b0703a1.tar.lz
gsoc2013-evolution-0676d2890e8def5d8876da6784df4e673b0703a1.tar.xz
gsoc2013-evolution-0676d2890e8def5d8876da6784df4e673b0703a1.tar.zst
gsoc2013-evolution-0676d2890e8def5d8876da6784df4e673b0703a1.zip
Don't reuse the exception if it has already been set.
2001-09-13 Jeffrey Stedfast <fejj@ximian.com> * camel-filter-driver.c (camel_filter_driver_filter_folder): Don't reuse the exception if it has already been set. (camel_filter_driver_filter_message): Same here. Also use the new return value from camel_filter_search_match(). * camel-filter-search.c (camel_filter_search_match): Return an integer (matched, no-match, or error). svn path=/trunk/; revision=12819
Diffstat (limited to 'camel/camel-filter-search.c')
-rw-r--r--camel/camel-filter-search.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/camel/camel-filter-search.c b/camel/camel-filter-search.c
index 9cbb87cce6..d6d60e2cf3 100644
--- a/camel/camel-filter-search.c
+++ b/camel/camel-filter-search.c
@@ -438,7 +438,18 @@ get_size (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageS
return r;
}
-gboolean
+
+/**
+ * camel_filter_search_match:
+ * @message:
+ * @info:
+ * @source:
+ * @expression:
+ * @ex:
+ *
+ * Returns one of CAMEL_SEARCH_MATCHED, CAMEL_SEARCH_NOMATCH, or CAMEL_SEARCH_ERROR.
+ **/
+int
camel_filter_search_match (CamelMimeMessage *message, CamelMessageInfo *info,
const char *source, const char *expression, CamelException *ex)
{
@@ -478,9 +489,9 @@ camel_filter_search_match (CamelMimeMessage *message, CamelMessageInfo *info,
}
if (result->type == ESEXP_RES_BOOL)
- retval = result->value.bool;
+ retval = result->value.bool ? CAMEL_SEARCH_MATCHED : CAMEL_SEARCH_NOMATCH;
else
- retval = FALSE;
+ retval = CAMEL_SEARCH_NOMATCH;
e_sexp_result_free (sexp, result);
e_sexp_unref (sexp);
@@ -489,5 +500,5 @@ camel_filter_search_match (CamelMimeMessage *message, CamelMessageInfo *info,
error:
e_sexp_unref (sexp);
- return FALSE;
+ return CAMEL_SEARCH_ERROR;
}