[evolution-patches] 72876, empty reply-to confusing reply to mail





Index: camel/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution-data-server/camel/ChangeLog,v
retrieving revision 1.2434
diff -u -p -r1.2434 ChangeLog
--- camel/ChangeLog	1 Mar 2005 02:37:22 -0000	1.2434
+++ camel/ChangeLog	1 Mar 2005 06:31:51 -0000
@@ -1,3 +1,10 @@
+2005-03-01  Not Zed  <NotZed Ximian com>
+
+	** See bug #72876
+
+	* camel-mime-message.c (process_header): if there are no addresses
+	in from or reply-to header, don't save empty address list.
+
 2005-02-28  Not Zed  <NotZed Ximian com>
 
 	** See bug #72609
Index: camel/camel-mime-message.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/camel/camel-mime-message.c,v
retrieving revision 1.131
diff -u -p -r1.131 camel-mime-message.c
--- camel/camel-mime-message.c	2 Dec 2004 08:03:30 -0000	1.131
+++ camel/camel-mime-message.c	1 Mar 2005 06:31:52 -0000
@@ -525,16 +525,24 @@ process_header (CamelMedium *medium, con
 	header_type = (CamelHeaderType) g_hash_table_lookup (header_name_table, name);
 	switch (header_type) {
 	case HEADER_FROM:
-		if (message->from)
-			camel_object_unref (message->from);
-		message->from = camel_internet_address_new ();
-		camel_address_decode (CAMEL_ADDRESS (message->from), value);
+		addr = camel_internet_address_new();
+		if (camel_address_decode((CamelAddress *)addr, value) <= 0) {
+			camel_object_unref(addr);
+		} else {
+			if (message->from)
+				camel_object_unref(message->from);
+			message->from = addr;
+		}
 		break;
 	case HEADER_REPLY_TO:
-		if (message->reply_to)
-			camel_object_unref (message->reply_to);
-		message->reply_to = camel_internet_address_new ();
-		camel_address_decode (CAMEL_ADDRESS (message->reply_to), value);
+		addr = camel_internet_address_new();
+		if (camel_address_decode((CamelAddress *)addr, value) <= 0) {
+			camel_object_unref(addr);
+		} else {
+			if (message->reply_to)
+				camel_object_unref(message->reply_to);
+			message->reply_to = addr;
+		}
 		break;
 	case HEADER_SUBJECT:
 		g_free (message->subject);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]