diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2001-09-29 07:31:42 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2001-09-29 07:31:42 +0800 |
commit | 22a9d810427da7139cf53532d460bde0ba534ac5 (patch) | |
tree | 7056a47d815986414680745ea5720bda8383e39e /camel | |
parent | e023c17d5c4585474511f657bd3fcac1ee8963e3 (diff) | |
download | gsoc2013-evolution-22a9d810427da7139cf53532d460bde0ba534ac5.tar gsoc2013-evolution-22a9d810427da7139cf53532d460bde0ba534ac5.tar.gz gsoc2013-evolution-22a9d810427da7139cf53532d460bde0ba534ac5.tar.bz2 gsoc2013-evolution-22a9d810427da7139cf53532d460bde0ba534ac5.tar.lz gsoc2013-evolution-22a9d810427da7139cf53532d460bde0ba534ac5.tar.xz gsoc2013-evolution-22a9d810427da7139cf53532d460bde0ba534ac5.tar.zst gsoc2013-evolution-22a9d810427da7139cf53532d460bde0ba534ac5.zip |
Same here.
2001-09-28 Jeffrey Stedfast <fejj@ximian.com>
* camel-filter-search.c (get_source): Same here.
* camel-mime-message.c (camel_mime_message_set_source): Don't use
the e_url_shroud hack, use CamelURL functions instead.
svn path=/trunk/; revision=13240
Diffstat (limited to 'camel')
-rw-r--r-- | camel/ChangeLog | 7 | ||||
-rw-r--r-- | camel/camel-filter-search.c | 17 | ||||
-rw-r--r-- | camel/camel-mime-message.c | 24 |
3 files changed, 34 insertions, 14 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog index 2d2a2c71ad..6f437277bd 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,5 +1,12 @@ 2001-09-28 Jeffrey Stedfast <fejj@ximian.com> + * camel-filter-search.c (get_source): Same here. + + * camel-mime-message.c (camel_mime_message_set_source): Don't use + the e_url_shroud hack, use CamelURL functions instead. + +2001-09-28 Jeffrey Stedfast <fejj@ximian.com> + * providers/nntp/camel-nntp-provider.c (camel_provider_module_init): Init the nntp url hash and url_equal functions. diff --git a/camel/camel-filter-search.c b/camel/camel-filter-search.c index c9c3d2853e..49ece8704a 100644 --- a/camel/camel-filter-search.c +++ b/camel/camel-filter-search.c @@ -35,7 +35,6 @@ #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" @@ -44,6 +43,8 @@ #include "camel-stream-mem.h" #include "camel-search-private.h" +#include "camel-url.h" + #define d(x) typedef struct { @@ -411,16 +412,22 @@ static ESExpResult * get_source (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms) { ESExpResult *r; - char *src; + char *src = NULL; char *tmp; r = e_sexp_result_new (f, ESEXP_RES_STRING); if (fms->source) { - src = e_url_shroud (fms->source); + CamelURL *url; + + url = camel_url_new (fms->source, NULL); + if (url) { + src = camel_url_to_string (url, CAMEL_URL_HIDE_ALL); + camel_url_free (url); + } } else { src = g_strdup (camel_mime_message_get_source (fms->message)); } - + /* This is an abusive hack */ if ( src && (tmp = strstr (src, "://")) ) { tmp += 3; @@ -428,7 +435,7 @@ get_source (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessag if (tmp) *tmp = '\0'; } - + r->value.string = src; return r; diff --git a/camel/camel-mime-message.c b/camel/camel-mime-message.c index 3ffa25f84e..53edc4f53b 100644 --- a/camel/camel-mime-message.c +++ b/camel/camel-mime-message.c @@ -32,13 +32,12 @@ #include <stdio.h> #include <string.h> -#include "e-util/e-url.h" - #include "camel-mime-message.h" #include "camel-multipart.h" #include "camel-stream-mem.h" #include "string-utils.h" #include "hash-table-utils.h" +#include "camel-url.h" #include "camel-stream-filter.h" #include "camel-stream-null.h" @@ -408,12 +407,18 @@ camel_mime_message_set_recipients(CamelMimeMessage *mime_message, const char *ty void camel_mime_message_set_source (CamelMimeMessage *mime_message, const char *src) { - char *shrouded_src; + CamelURL *url; + char *uri; + g_assert (mime_message); - shrouded_src = e_url_shroud (src); - camel_medium_add_header (CAMEL_MEDIUM (mime_message), "X-Evolution-Source", shrouded_src); - g_free (shrouded_src); + url = camel_url_new (src, NULL); + if (url) { + uri = camel_url_to_string (url, CAMEL_URL_HIDE_ALL); + camel_medium_add_header (CAMEL_MEDIUM (mime_message), "X-Evolution-Source", uri); + g_free (uri); + camel_url_free (url); + } } const char * @@ -843,16 +848,17 @@ struct _check_content_id { }; static gboolean -check_content_id (CamelMimeMessage *message, CamelMimePart *part, struct _check_content_id *data) +check_content_id (CamelMimeMessage *message, CamelMimePart *part, void *data) { + struct _check_content_id *check = (struct _check_content_id *) data; const char *content_id; gboolean found; content_id = camel_mime_part_get_content_id (part); - found = content_id && !strcmp (content_id, data->content_id) ? TRUE : FALSE; + found = content_id && !strcmp (content_id, check->content_id) ? TRUE : FALSE; if (found) { - data->part = part; + check->part = part; camel_object_ref (CAMEL_OBJECT (part)); } |