aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2002-10-17 10:12:41 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2002-10-17 10:12:41 +0800
commit00eecfd48b1f75da784d0ce93e6be193adb594e8 (patch)
treeaba36be92230a420084140f0a0869273fcb19e97
parent8e2daf88d3318b1033d714c27234e1918c016e52 (diff)
downloadgsoc2013-evolution-00eecfd48b1f75da784d0ce93e6be193adb594e8.tar
gsoc2013-evolution-00eecfd48b1f75da784d0ce93e6be193adb594e8.tar.gz
gsoc2013-evolution-00eecfd48b1f75da784d0ce93e6be193adb594e8.tar.bz2
gsoc2013-evolution-00eecfd48b1f75da784d0ce93e6be193adb594e8.tar.lz
gsoc2013-evolution-00eecfd48b1f75da784d0ce93e6be193adb594e8.tar.xz
gsoc2013-evolution-00eecfd48b1f75da784d0ce93e6be193adb594e8.tar.zst
gsoc2013-evolution-00eecfd48b1f75da784d0ce93e6be193adb594e8.zip
If mode == REPLY_LIST and the mlist is "" (we only checked NULL before),
2002-10-16 Jeffrey Stedfast <fejj@ximian.com> * 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
-rw-r--r--mail/ChangeLog7
-rw-r--r--mail/mail-callbacks.c10
2 files changed, 11 insertions, 6 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index e00aa9f2f2..8de89bb23f 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,10 @@
+2002-10-16 Jeffrey Stedfast <fejj@ximian.com>
+
+ * 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
+
2002-10-12 Jeffrey Stedfast <fejj@ximian.com>
* mail-callbacks.c (mail_generate_reply): If we are trying to
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;
}
}