diff options
Diffstat (limited to 'camel')
-rw-r--r-- | camel/ChangeLog | 7 | ||||
-rw-r--r-- | camel/camel-filter-search.c | 17 | ||||
-rw-r--r-- | camel/camel-internet-address.c | 2 |
3 files changed, 22 insertions, 4 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog index 7b2d2fa8d3..8e8d303b82 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,3 +1,10 @@ +2001-04-13 Jon Trowbridge <trow@gnu.org> + + * camel-filter-search.c (get_source): Make the (previously unused) + get-source command actually do the right thing, properly shrouding + any passed-in source and falling back to use the source attached + to the mime message. + 2001-04-13 Dan Winship <danw@ximian.com> * camel-object.c (camel_object_hook_event): diff --git a/camel/camel-filter-search.c b/camel/camel-filter-search.c index 15e8eb77f2..78f4ee7b4c 100644 --- a/camel/camel-filter-search.c +++ b/camel/camel-filter-search.c @@ -35,6 +35,7 @@ #include <ctype.h> #include "e-util/e-sexp.h" +#include "e-util/e-url.h" #include "camel-mime-message.h" #include "camel-filter-search.h" @@ -397,13 +398,20 @@ get_source (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessag ESExpResult *r; r = e_sexp_result_new(f, ESEXP_RES_STRING); - r->value.string = g_strdup (fms->source); + if (fms->source) { + r->value.string = e_url_shroud (fms->source); + } else { + r->value.string = camel_mime_message_get_source (fms->message); + } + + g_message ("got source: [%s]", r->value.string); return r; } -gboolean camel_filter_search_match(CamelMimeMessage *message, CamelMessageInfo *info, - const char *source, const char *expression, CamelException *ex) +gboolean +camel_filter_search_match(CamelMimeMessage *message, CamelMessageInfo *info, + const char *source, const char *expression, CamelException *ex) { FilterMessageSearch fms; ESExp *sexp; @@ -452,3 +460,6 @@ error: e_sexp_unref(sexp); return FALSE; } + + + diff --git a/camel/camel-internet-address.c b/camel/camel-internet-address.c index 416451b27d..902178c303 100644 --- a/camel/camel-internet-address.c +++ b/camel/camel-internet-address.c @@ -24,7 +24,7 @@ #include "camel-mime-utils.h" #include "camel-internet-address.h" -#define d(x) +#define d(x) static int internet_decode (CamelAddress *, const char *raw); static char * internet_encode (CamelAddress *); |