From 8ed14acbc89554342447d38b21456550e05731e6 Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Wed, 16 Oct 2002 16:17:10 +0000 Subject: If we are trying to reply to a list, first check that we can by getting 2002-10-12 Jeffrey Stedfast * mail-callbacks.c (mail_generate_reply): If we are trying to reply to a list, first check that we can by getting the mlist token (makes it easier to fix the mem leak). If not, then change the mode to REPLY_ALL. If we can reply to list, the make sure we free the CamelMessageInfo when we're done so we don't leak. svn path=/trunk/; revision=18376 --- mail/mail-callbacks.c | 25 +++++-------------------- 1 file changed, 5 insertions(+), 20 deletions(-) (limited to 'mail/mail-callbacks.c') diff --git a/mail/mail-callbacks.c b/mail/mail-callbacks.c index a126697b6d..8c92f0479f 100644 --- a/mail/mail-callbacks.c +++ b/mail/mail-callbacks.c @@ -1095,26 +1095,11 @@ mail_generate_reply (CamelFolder *folder, CamelMimeMessage *message, const char d(printf ("we are looking for the mailing list called: %s\n", mlist)); - i = max = 0; - - /* some mailing-lists set the Reply-To to the list address */ - reply_to = camel_mime_message_get_reply_to (message); - if (reply_to) { - max = camel_address_length (CAMEL_ADDRESS (reply_to)); - for (i = 0; i < max; i++) { - camel_internet_address_get (reply_to, i, &name, &address); - if (!g_strncasecmp (address, mlist, len)) - break; - } - } - - if (i == max) { - 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)) - break; - } + 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)) + break; } if (i == max) { -- cgit v1.2.3