[evolution-mapi] BGO 586924 – Evolution crashed when trying to send mail



commit b0e58f45435c83c38459e4d72ce33bdc89ad46e1
Author: Johnny Jacob <jjohnny novell com>
Date:   Mon Jul 13 14:53:40 2009 +0530

    BGO 586924 â?? Evolution crashed when trying to send mail

 src/camel/ChangeLog              |    6 ++++++
 src/camel/camel-mapi-transport.c |   11 ++++++++---
 2 files changed, 14 insertions(+), 3 deletions(-)
---
diff --git a/src/camel/ChangeLog b/src/camel/ChangeLog
index f2ecfce..3e0ca7b 100644
--- a/src/camel/ChangeLog
+++ b/src/camel/ChangeLog
@@ -1,3 +1,9 @@
+2009-07-13  Johnny Jacob  <jjohnny novell com>
+
+	** Fix for Bug 586924 â?? Evolution crashed when trying to send mail
+
+	* camel-mapi-transport.c (mail_build_props): Don't add empty properties.
+
 2009-06-22  Johnny Jacob  <jjohnny novell com>
 
 	* camel-mapi-transport.c (mapi_send_to, mail_build_props): Add Message threading
diff --git a/src/camel/camel-mapi-transport.c b/src/camel/camel-mapi-transport.c
index 2af55e6..4904dd7 100644
--- a/src/camel/camel-mapi-transport.c
+++ b/src/camel/camel-mapi-transport.c
@@ -415,9 +415,14 @@ mail_build_props (struct SPropValue **value, struct SPropTagArray *SPropTagArray
 	set_SPropValue_proptag(&props[i++], PR_MESSAGE_FLAGS, (void *)msgflag);
 
 	/* Message threading information */
-	set_SPropValue_proptag(&props[i++], PR_INTERNET_REFERENCES, g_strdup (item->header.references));
-	set_SPropValue_proptag(&props[i++], PR_IN_REPLY_TO_ID, g_strdup (item->header.in_reply_to));
-	set_SPropValue_proptag(&props[i++], PR_INTERNET_MESSAGE_ID, g_strdup (item->header.message_id));
+	if (item->header.references)
+		set_SPropValue_proptag(&props[i++], PR_INTERNET_REFERENCES, g_strdup (item->header.references));
+
+	if (item->header.in_reply_to)
+		set_SPropValue_proptag(&props[i++], PR_IN_REPLY_TO_ID, g_strdup (item->header.in_reply_to));
+
+	if (item->header.message_id)
+		set_SPropValue_proptag(&props[i++], PR_INTERNET_MESSAGE_ID, g_strdup (item->header.message_id));
 
 	for (l = item->msg.body_parts; l; l = l->next) {
 		ExchangeMAPIStream *stream = (ExchangeMAPIStream *) (l->data);



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