aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2002-04-17 09:25:28 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2002-04-17 09:25:28 +0800
commitfc281a966c29421c896746d784a6f1393fe37f3f (patch)
treec6c576c8372840c627636aa396f075a171d25c9c /camel/providers
parentb06b0051c5fee1c0eafa87f164fe0b8f4e27e5ef (diff)
downloadgsoc2013-evolution-fc281a966c29421c896746d784a6f1393fe37f3f.tar
gsoc2013-evolution-fc281a966c29421c896746d784a6f1393fe37f3f.tar.gz
gsoc2013-evolution-fc281a966c29421c896746d784a6f1393fe37f3f.tar.bz2
gsoc2013-evolution-fc281a966c29421c896746d784a6f1393fe37f3f.tar.lz
gsoc2013-evolution-fc281a966c29421c896746d784a6f1393fe37f3f.tar.xz
gsoc2013-evolution-fc281a966c29421c896746d784a6f1393fe37f3f.tar.zst
gsoc2013-evolution-fc281a966c29421c896746d784a6f1393fe37f3f.zip
Get rid of an unused variable.
2002-04-16 Jeffrey Stedfast <fejj@ximian.com> * camel-filter-driver.c (camel_filter_driver_filter_folder): Get rid of an unused variable. * providers/smtp/camel-smtp-transport.c (smtp_helo): Use camel_gethostbyaddr since gethostbyaddr is not reentrant. * camel-http-stream.c (http_connect): Updated after the rename of camel_get_host_byname. * camel-service.c (camel_gethostbyname): Renamed. (camel_gethostbyaddr): New cancellable/reentrant version of gethostbyaddr. svn path=/trunk/; revision=16484
Diffstat (limited to 'camel/providers')
-rw-r--r--camel/providers/smtp/camel-smtp-transport.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/camel/providers/smtp/camel-smtp-transport.c b/camel/providers/smtp/camel-smtp-transport.c
index f71f8b4050..2a5640d7ab 100644
--- a/camel/providers/smtp/camel-smtp-transport.c
+++ b/camel/providers/smtp/camel-smtp-transport.c
@@ -831,24 +831,30 @@ smtp_helo (CamelSmtpTransport *transport, CamelException *ex)
{
/* say hello to the server */
char *name, *cmdbuf, *respbuf = NULL;
- const char *token;
struct hostent *host;
+ CamelException err;
+ const char *token;
camel_operation_start_transient (NULL, _("SMTP Greeting"));
/* get the local host name */
- host = gethostbyaddr ((char *)&transport->localaddr->address,
- transport->localaddr->length, AF_INET);
- if (host && host->h_name)
+ camel_exception_init (&err);
+ host = camel_gethostbyaddr ((char *) &transport->localaddr->address,
+ transport->localaddr->length, AF_INET, &err);
+ camel_exception_clear (&err);
+
+ if (host && host->h_name) {
name = g_strdup (host->h_name);
- else {
+ } else {
name = g_strdup_printf ("[%d.%d.%d.%d]",
transport->localaddr->address[0],
transport->localaddr->address[1],
transport->localaddr->address[2],
transport->localaddr->address[3]);
}
-
+
+ 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);