aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2003-05-14 02:10:12 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2003-05-14 02:10:12 +0800
commit989f63407104ff10fe275baf68bfe0b53fd693fb (patch)
tree71df2db37221c1de88de5cfd4f6be765baf56cb6
parenta66a0e81e1458f108ea89762e7413ee7fab5c753 (diff)
downloadgsoc2013-evolution-989f63407104ff10fe275baf68bfe0b53fd693fb.tar
gsoc2013-evolution-989f63407104ff10fe275baf68bfe0b53fd693fb.tar.gz
gsoc2013-evolution-989f63407104ff10fe275baf68bfe0b53fd693fb.tar.bz2
gsoc2013-evolution-989f63407104ff10fe275baf68bfe0b53fd693fb.tar.lz
gsoc2013-evolution-989f63407104ff10fe275baf68bfe0b53fd693fb.tar.xz
gsoc2013-evolution-989f63407104ff10fe275baf68bfe0b53fd693fb.tar.zst
gsoc2013-evolution-989f63407104ff10fe275baf68bfe0b53fd693fb.zip
If host->h_name is NULL or an empty string, default back to using the IP
2003-05-12 Jeffrey Stedfast <fejj@ximian.com> * providers/smtp/camel-smtp-transport.c (smtp_helo): If host->h_name is NULL or an empty string, default back to using the IP address rather than the hostname in the EHLO command. svn path=/trunk/; revision=21159
-rw-r--r--camel/ChangeLog6
-rw-r--r--camel/providers/smtp/camel-smtp-transport.c11
2 files changed, 12 insertions, 5 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index 840a8cf37b..d2f4dc8de1 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,3 +1,9 @@
+2003-05-12 Jeffrey Stedfast <fejj@ximian.com>
+
+ * providers/smtp/camel-smtp-transport.c (smtp_helo): If
+ host->h_name is NULL or an empty string, default back to using the
+ IP address rather than the hostname in the EHLO command.
+
2003-05-13 Ettore Perazzoli <ettore@ximian.com>
* providers/imap/camel-imap-folder.c (d): Disable debugging.
diff --git a/camel/providers/smtp/camel-smtp-transport.c b/camel/providers/smtp/camel-smtp-transport.c
index 83bb39c577..84948f91eb 100644
--- a/camel/providers/smtp/camel-smtp-transport.c
+++ b/camel/providers/smtp/camel-smtp-transport.c
@@ -891,10 +891,8 @@ smtp_helo (CamelSmtpTransport *transport, CamelException *ex)
camel_exception_clear (&err);
- if (host) {
- if (host->h_name && *host->h_name)
- name = g_strdup (host->h_name);
- camel_free_host (host);
+ if (host && host->h_name && *host->h_name) {
+ name = g_strdup (host->h_name);
} else {
#ifdef ENABLE_IPv6
char ip[MAXHOSTNAMELEN + 1];
@@ -911,7 +909,10 @@ smtp_helo (CamelSmtpTransport *transport, CamelException *ex)
transport->localaddr->address[3]);
#endif
}
-
+
+ if (host)
+ camel_free_host (host);
+
/* hiya server! how are you today? */
if (transport->flags & CAMEL_SMTP_TRANSPORT_IS_ESMTP)
cmdbuf = g_strdup_printf ("EHLO %s\r\n", name);