[balsa] Do not append NULL internet-address-list
- From: Peter Bloomfield <PeterB src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [balsa] Do not append NULL internet-address-list
- Date: Wed, 16 Dec 2009 16:25:45 +0000 (UTC)
commit 4001da85c0db801870070a6189d39eb2074c2a04
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date: Wed Dec 16 11:25:33 2009 -0500
Do not append NULL internet-address-list
ChangeLog | 9 +++++++--
libbalsa/send.c | 35 ++++++++++++++++++++++-------------
2 files changed, 29 insertions(+), 15 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 57e05ae..da0493b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,12 @@
+2009-12-16 Peter Bloomfield
+
+ * libbalsa/send.c (libbalsa_message_create_mime_message): do not
+ append NULL list in internet_address_list_append.
+
2009-12-16 Mario Mikocevic <mario mikocevic t-com hr>
- * balsa.spec.in: for 2.4.2 to successfuly compile a rpm, following
- small patch is needed.
+ * balsa.spec.in: for 2.4.2 to successfuly compile a rpm, a small
+ patch is needed.
2009-12-14 Peter Bloomfield
diff --git a/libbalsa/send.c b/libbalsa/send.c
index 7ee478e..d3beeec 100644
--- a/libbalsa/send.c
+++ b/libbalsa/send.c
@@ -1673,7 +1673,7 @@ libbalsa_message_create_mime_message(LibBalsaMessage* message, gboolean flow,
GMimeObject *mime_root = NULL;
GMimeMessage *mime_message;
LibBalsaMessageBody *body;
- InternetAddressList *recipients;
+ InternetAddressList *ia_list;
gchar *tmp;
GList *list;
GtkWindow * parent;
@@ -1900,18 +1900,27 @@ libbalsa_message_create_mime_message(LibBalsaMessage* message, gboolean flow,
g_mime_message_set_date(mime_message, message->headers->date,
get_tz_offset(&message->headers->date));
- recipients = g_mime_message_get_recipients(mime_message,
- GMIME_RECIPIENT_TYPE_TO);
- internet_address_list_append(recipients, message->headers->to_list);
-
- recipients = g_mime_message_get_recipients(mime_message,
- GMIME_RECIPIENT_TYPE_CC);
- internet_address_list_append(recipients, message->headers->cc_list);
-
- recipients = g_mime_message_get_recipients(mime_message,
- GMIME_RECIPIENT_TYPE_BCC);
- internet_address_list_append(recipients, message->headers->bcc_list);
-
+ if ((ia_list = message->headers->to_list)) {
+ InternetAddressList *recipients =
+ g_mime_message_get_recipients(mime_message,
+ GMIME_RECIPIENT_TYPE_TO);
+ internet_address_list_append(recipients, ia_list);
+ }
+
+ if ((ia_list = message->headers->cc_list)) {
+ InternetAddressList *recipients =
+ g_mime_message_get_recipients(mime_message,
+ GMIME_RECIPIENT_TYPE_CC);
+ internet_address_list_append(recipients, ia_list);
+ }
+
+ if ((ia_list = message->headers->bcc_list)) {
+ InternetAddressList *recipients =
+ g_mime_message_get_recipients(mime_message,
+ GMIME_RECIPIENT_TYPE_BCC);
+ internet_address_list_append(recipients, ia_list);
+ }
+
if (message->headers->dispnotify_to) {
tmp = internet_address_list_to_string(message->headers->dispnotify_to, TRUE);
if (tmp) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]