From 4f7a55138c376aa0fb09d4b37d7dd7dd2449ed2c Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Wed, 17 May 2000 14:58:52 +0000 Subject: error checking on gethostbyaddr() in providers/smtp/camel-smtp-transport.c svn path=/trunk/; revision=3104 --- camel/providers/smtp/camel-smtp-transport.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'camel/providers') 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, -- cgit v1.2.3