Check if we are trying to reply to a message with no From: field, and try
2001-08-27 Jon Trowbridge <trow@ximian.com> * mail-callbacks.c (mail_generate_reply): Check if we are trying to reply to a message with no From: field, and try to do something graceful in that case. (Bug #7028) * mail-display.c (ebook_callback): Add paranoid checks for the case of a message with a From: field. (Also maybe bug #7028) svn path=/trunk/; revision=12490
This commit is contained in:
committed by
Jon Trowbridge
parent
7c5fe3b52c
commit
68a8a866bb
@ -1,3 +1,12 @@
|
||||
2001-08-27 Jon Trowbridge <trow@ximian.com>
|
||||
|
||||
* mail-callbacks.c (mail_generate_reply): Check if we are trying
|
||||
to reply to a message with no From: field, and try to do something
|
||||
graceful in that case. (Bug #7028)
|
||||
|
||||
* mail-display.c (ebook_callback): Add paranoid checks for the
|
||||
case of a message with a From: field. (Also maybe bug #7028)
|
||||
|
||||
2001-08-27 Iain Holmes <iain@ximian.com>
|
||||
|
||||
* mail-config-druid.c (druid_finish): Free the list and hash table.
|
||||
|
||||
@ -660,7 +660,12 @@ mail_generate_reply (CamelFolder *folder, CamelMimeMessage *message, const char
|
||||
return NULL;
|
||||
|
||||
sender = camel_mime_message_get_from (message);
|
||||
camel_internet_address_get (sender, 0, &name, &address);
|
||||
if (sender != NULL && camel_address_length (CAMEL_ADDRESS (sender)) > 0) {
|
||||
camel_internet_address_get (sender, 0, &name, &address);
|
||||
} else {
|
||||
name = _("an unknown sender");
|
||||
}
|
||||
|
||||
date = camel_mime_message_get_date (message, NULL);
|
||||
|
||||
strftime (date_str, sizeof (date_str), _("On %a, %Y-%m-%d at %H:%M, %%s wrote:"),
|
||||
|
||||
@ -952,11 +952,14 @@ ebook_callback (EBook *book, const gchar *addr, ECard *card, gpointer data)
|
||||
|
||||
if (card && md->current_message) {
|
||||
const CamelInternetAddress *from = camel_mime_message_get_from (md->current_message);
|
||||
const char *md_name, *md_addr;
|
||||
const char *md_name = NULL, *md_addr = NULL;
|
||||
|
||||
if (camel_internet_address_get (from, 0, &md_name, &md_addr) &&
|
||||
!strcmp (addr, md_addr))
|
||||
mail_display_load_images (md);
|
||||
/* We are extra anal, in case we are dealing with some sort of pathological message
|
||||
w/o a From: header. */
|
||||
if (from != NULL && camel_internet_address_get (from, 0, &md_name, &md_addr)) {
|
||||
if (md_addr != NULL && strcmp (addr, md_addr))
|
||||
mail_display_load_images (md);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user