From 00eecfd48b1f75da784d0ce93e6be193adb594e8 Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Thu, 17 Oct 2002 02:12:41 +0000 Subject: If mode == REPLY_LIST and the mlist is "" (we only checked NULL before), 2002-10-16 Jeffrey Stedfast * mail-callbacks.c (mail_generate_reply): If mode == REPLY_LIST and the mlist is "" (we only checked NULL before), change the mode to REPLY_ALL so that we don't accidently reply to the user's address. Fixes bug #28735 svn path=/trunk/; revision=18381 --- mail/mail-callbacks.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'mail/mail-callbacks.c') diff --git a/mail/mail-callbacks.c b/mail/mail-callbacks.c index 8c92f0479f..fa012e6c5b 100644 --- a/mail/mail-callbacks.c +++ b/mail/mail-callbacks.c @@ -1078,7 +1078,7 @@ mail_generate_reply (CamelFolder *folder, CamelMimeMessage *message, const char if (mode == REPLY_LIST) { /* make sure we can reply to an mlist */ info = camel_folder_get_message_info (folder, uid); - if (!(mlist = camel_message_info_mlist (info))) { + if (!(mlist = camel_message_info_mlist (info)) || *mlist == '\0') { camel_folder_free_message_info (folder, info); mode = REPLY_ALL; info = NULL; @@ -1088,17 +1088,15 @@ mail_generate_reply (CamelFolder *folder, CamelMimeMessage *message, const char determine_recipients: if (mode == REPLY_LIST) { EDestination *dest; - int i, max, len; + int i, max; /* look through the recipients to find the *real* mailing list address */ - len = strlen (mlist); - d(printf ("we are looking for the mailing list called: %s\n", mlist)); max = camel_address_length (CAMEL_ADDRESS (to_addrs)); for (i = 0; i < max; i++) { camel_internet_address_get (to_addrs, i, &name, &address); - if (!g_strncasecmp (address, mlist, len)) + if (!g_strcasecmp (address, mlist)) break; } @@ -1106,7 +1104,7 @@ mail_generate_reply (CamelFolder *folder, CamelMimeMessage *message, const char max = camel_address_length (CAMEL_ADDRESS (cc_addrs)); for (i = 0; i < max; i++) { camel_internet_address_get (cc_addrs, i, &name, &address); - if (!g_strncasecmp (address, mlist, len)) + if (!g_strcasecmp (address, mlist)) break; } } -- cgit v1.2.3