diff options
-rw-r--r-- | camel/ChangeLog | 6 | ||||
-rw-r--r-- | camel/camel-filter-driver.c | 13 |
2 files changed, 11 insertions, 8 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog index 142cf670f4..ba2236e2d6 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,3 +1,9 @@ +2002-05-28 Jeffrey Stedfast <fejj@ximian.com> + + * camel-filter-driver.c (camel_filter_driver_log): Use the + CamelMessageInfo rather than the CamelMimeMessage because the + message may not have been loaded (thus NULL). + 2002-05-27 Jeffrey Stedfast <fejj@ximian.com> * providers/smtp/camel-smtp-transport.c (connect_to_server): On diff --git a/camel/camel-filter-driver.c b/camel/camel-filter-driver.c index 8df6a0d1b4..e523bf4726 100644 --- a/camel/camel-filter-driver.c +++ b/camel/camel-filter-driver.c @@ -755,23 +755,20 @@ camel_filter_driver_log (CamelFilterDriver *driver, enum filter_log_t status, co case FILTER_LOG_START: { /* write log header */ const char *subject = NULL; - char *fromstr; - const CamelInternetAddress *from; + const char *from = NULL; char date[50]; time_t t; /* FIXME: does this need locking? Probably */ - /* FIXME: use info for these, not message since message may not be loaded */ - from = camel_mime_message_get_from (p->message); - fromstr = camel_address_format((CamelAddress *)from); - subject = camel_mime_message_get_subject (p->message); + from = camel_message_info_from (p->info); + subject = camel_message_info_subject (p->info); time (&t); strftime (date, 49, "%a, %d %b %Y %H:%M:%S", localtime (&t)); fprintf (p->logfile, "Applied filter \"%s\" to message from %s - \"%s\" at %s\n", - str, fromstr ? fromstr : "unknown", subject ? subject : "", date); - g_free(fromstr); + str, from ? from : "unknown", subject ? subject : "", date); + break; } case FILTER_LOG_ACTION: |