aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2003-01-05 06:50:01 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2003-01-05 06:50:01 +0800
commit73fa3a6e62f671e34ab1206425c39d8d8b987ba2 (patch)
tree70d864e5898312960c629b50620e84e0c6c504fc
parent6313402ba1f2c48183715d1f5170e9ce4e73a391 (diff)
downloadgsoc2013-evolution-73fa3a6e62f671e34ab1206425c39d8d8b987ba2.tar
gsoc2013-evolution-73fa3a6e62f671e34ab1206425c39d8d8b987ba2.tar.gz
gsoc2013-evolution-73fa3a6e62f671e34ab1206425c39d8d8b987ba2.tar.bz2
gsoc2013-evolution-73fa3a6e62f671e34ab1206425c39d8d8b987ba2.tar.lz
gsoc2013-evolution-73fa3a6e62f671e34ab1206425c39d8d8b987ba2.tar.xz
gsoc2013-evolution-73fa3a6e62f671e34ab1206425c39d8d8b987ba2.tar.zst
gsoc2013-evolution-73fa3a6e62f671e34ab1206425c39d8d8b987ba2.zip
Instead of checking recipients != NULL, check that camel_address_length
2003-01-04 Jeffrey Stedfast <fejj@ximian.com> * providers/smtp/camel-smtp-transport.c (smtp_send_to): Instead of checking recipients != NULL, check that camel_address_length (recipients) != 0 since it is illegal for recipients to be NULL (camel_transport_send_to already checks this). svn path=/trunk/; revision=19235
-rw-r--r--camel/ChangeLog7
-rw-r--r--camel/providers/smtp/camel-smtp-transport.c4
2 files changed, 9 insertions, 2 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index 168edae899..5acca4ea20 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,3 +1,10 @@
+2003-01-04 Jeffrey Stedfast <fejj@ximian.com>
+
+ * providers/smtp/camel-smtp-transport.c (smtp_send_to): Instead of
+ checking recipients != NULL, check that camel_address_length
+ (recipients) != 0 since it is illegal for recipients to be NULL
+ (camel_transport_send_to already checks this).
+
2002-12-17 Jeffrey Stedfast <fejj@ximian.com>
* providers/imap/camel-imap-utils.c: Replace calls to
diff --git a/camel/providers/smtp/camel-smtp-transport.c b/camel/providers/smtp/camel-smtp-transport.c
index 03e7d03bd6..bfe9737d40 100644
--- a/camel/providers/smtp/camel-smtp-transport.c
+++ b/camel/providers/smtp/camel-smtp-transport.c
@@ -698,14 +698,14 @@ smtp_send_to (CamelTransport *transport, CamelMimeMessage *message,
return FALSE;
}
- if (!recipients) {
+ len = camel_address_length (recipients);
+ if (len == 0) {
camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
_("Cannot send message: no recipients defined."));
camel_operation_end (NULL);
return FALSE;
}
- len = camel_address_length (recipients);
cia = CAMEL_INTERNET_ADDRESS (recipients);
for (i = 0; i < len; i++) {
if (!camel_internet_address_get (cia, i, NULL, &addr)) {