aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@src.gnome.org>2000-05-17 22:58:52 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2000-05-17 22:58:52 +0800
commit4f7a55138c376aa0fb09d4b37d7dd7dd2449ed2c (patch)
tree82570dbb01852eb07087e113c6335294e2e90cc4 /camel/providers
parentd4f3e3b651f787cd418d3055ceb12e1193f27aad (diff)
downloadgsoc2013-evolution-4f7a55138c376aa0fb09d4b37d7dd7dd2449ed2c.tar
gsoc2013-evolution-4f7a55138c376aa0fb09d4b37d7dd7dd2449ed2c.tar.gz
gsoc2013-evolution-4f7a55138c376aa0fb09d4b37d7dd7dd2449ed2c.tar.bz2
gsoc2013-evolution-4f7a55138c376aa0fb09d4b37d7dd7dd2449ed2c.tar.lz
gsoc2013-evolution-4f7a55138c376aa0fb09d4b37d7dd7dd2449ed2c.tar.xz
gsoc2013-evolution-4f7a55138c376aa0fb09d4b37d7dd7dd2449ed2c.tar.zst
gsoc2013-evolution-4f7a55138c376aa0fb09d4b37d7dd7dd2449ed2c.zip
error checking on gethostbyaddr() in providers/smtp/camel-smtp-transport.c
svn path=/trunk/; revision=3104
Diffstat (limited to 'camel/providers')
-rw-r--r--camel/providers/smtp/camel-smtp-transport.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/camel/providers/smtp/camel-smtp-transport.c b/camel/providers/smtp/camel-smtp-transport.c
index f7de36f571..5b9e858a65 100644
--- a/camel/providers/smtp/camel-smtp-transport.c
+++ b/camel/providers/smtp/camel-smtp-transport.c
@@ -473,9 +473,9 @@ smtp_helo (CamelSmtpTransport *transport, CamelException *ex)
/* hiya server! how are you today? */
if (smtp_is_esmtp)
- cmdbuf = g_strdup_printf ("EHLO %s\r\n", host->h_name);
+ cmdbuf = g_strdup_printf ("EHLO %s\r\n", host && host->h_name ? host->h_name : inet_ntoa(localaddr.sin_addr));
else
- cmdbuf = g_strdup_printf ("HELO %s\r\n", host->h_name);
+ cmdbuf = g_strdup_printf ("HELO %s\r\n", host && host->h_name ? host->h_name : inet_ntoa(localaddr.sin_addr));
if ( camel_stream_write (transport->ostream, cmdbuf, strlen(cmdbuf), ex) == -1) {
g_free(cmdbuf);
camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,