From 5c542983e4f313c9e2f5b33b9106ed479ef46c23 Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Thu, 30 Nov 2000 18:57:19 +0000 Subject: Update to use EStrv in appropriate places (wrapped with #ifdef DOESTRV for 2000-11-30 Jeffrey Stedfast * filter-driver.c (filter_driver_filter_message): Update to use EStrv in appropriate places (wrapped with #ifdef DOESTRV for the moment). svn path=/trunk/; revision=6739 --- filter/ChangeLog | 6 ++++++ filter/filter-driver.c | 27 +++++++++++++++++++++++---- 2 files changed, 29 insertions(+), 4 deletions(-) (limited to 'filter') diff --git a/filter/ChangeLog b/filter/ChangeLog index a1cef8c4d5..63071ff250 100644 --- a/filter/ChangeLog +++ b/filter/ChangeLog @@ -1,3 +1,9 @@ +2000-11-30 Jeffrey Stedfast + + * filter-driver.c (filter_driver_filter_message): Update to use + EStrv in appropriate places (wrapped with #ifdef DOESTRV for the + moment). + 2000-11-27 Jeffrey Stedfast * filtertypes.xml: Moved the regex filter rule around - we've diff --git a/filter/filter-driver.c b/filter/filter-driver.c index fca858d187..1b8038062a 100644 --- a/filter/filter-driver.c +++ b/filter/filter-driver.c @@ -39,6 +39,7 @@ #include "filter-context.h" #include "filter-filter.h" #include "e-util/e-sexp.h" +#include "e-util/e-memory.h" #define d(x) @@ -737,13 +738,27 @@ filter_driver_filter_message (FilterDriver *driver, CamelMimeMessage *message, C if (info == NULL) { struct _header_raw *h = CAMEL_MIME_PART (message)->headers; + char *subject, *from, *to, *cc; info = g_new0 (CamelMessageInfo, 1); freeinfo = TRUE; - info->subject = camel_folder_summary_format_string (h, "subject"); - info->from = camel_folder_summary_format_address (h, "from"); - info->to = camel_folder_summary_format_address (h, "to"); - info->cc = camel_folder_summary_format_address (h, "cc"); + + /* FIXME: do we even *need* to set these? Are they even used? -- fejj */ + subject = camel_folder_summary_format_string (h, "subject"); + from = camel_folder_summary_format_address (h, "from"); + to = camel_folder_summary_format_address (h, "to"); + cc = camel_folder_summary_format_address (h, "cc"); +#ifdef DOESTRV + camel_message_info_set_subject (info, subject); + camel_message_info_set_from (info, from); + camel_message_info_set_to (info, to); + camel_message_info_set_cc (info, cc); +#else + info->subject = subject; + info->from = from; + info->to = to; + info->cc = cc; +#endif /* DOESTRV */ } else { if (info->flags & CAMEL_MESSAGE_DELETED) return; @@ -810,10 +825,14 @@ filter_driver_filter_message (FilterDriver *driver, CamelMimeMessage *message, C if (freeinfo) { camel_flag_list_free (&info->user_flags); camel_tag_list_free (&info->user_tags); +#ifdef DOESTRV + e_strv_destroy (info->strings); +#else g_free (info->subject); g_free (info->from); g_free (info->to); g_free (info->cc); +#endif /* DOESTRV */ g_free (info); } -- cgit v1.2.3