aboutsummaryrefslogtreecommitdiffstats
path: root/camel
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2001-04-27 00:48:35 +0800
committerDan Winship <danw@src.gnome.org>2001-04-27 00:48:35 +0800
commitf9189bfda949a1f60a362fd8b2e552a61b5e42c7 (patch)
treef27d59c859f982247eb40a6f81e4316d97dfbccb /camel
parent8af4ab06a2baac12d25531588923c8d3faa77bb4 (diff)
downloadgsoc2013-evolution-f9189bfda949a1f60a362fd8b2e552a61b5e42c7.tar
gsoc2013-evolution-f9189bfda949a1f60a362fd8b2e552a61b5e42c7.tar.gz
gsoc2013-evolution-f9189bfda949a1f60a362fd8b2e552a61b5e42c7.tar.bz2
gsoc2013-evolution-f9189bfda949a1f60a362fd8b2e552a61b5e42c7.tar.lz
gsoc2013-evolution-f9189bfda949a1f60a362fd8b2e552a61b5e42c7.tar.xz
gsoc2013-evolution-f9189bfda949a1f60a362fd8b2e552a61b5e42c7.tar.zst
gsoc2013-evolution-f9189bfda949a1f60a362fd8b2e552a61b5e42c7.zip
Use e_gethostbyname_r. (camel_service_gethost): Remove unused var.
* camel-service.c (get_host): Use e_gethostbyname_r. (camel_service_gethost): Remove unused var. svn path=/trunk/; revision=9583
Diffstat (limited to 'camel')
-rw-r--r--camel/ChangeLog5
-rw-r--r--camel/camel-service.c12
2 files changed, 8 insertions, 9 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index 760e6ff120..f949548ade 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,3 +1,8 @@
+2001-04-26 Dan Winship <danw@ximian.com>
+
+ * camel-service.c (get_host): Use e_gethostbyname_r.
+ (camel_service_gethost): Remove unused var.
+
2001-04-26 Not Zed <NotZed@Ximian.com>
* Applied jacob's patches for e-poolv stuff.
diff --git a/camel/camel-service.c b/camel/camel-service.c
index 8c37b0e79d..7c31bde274 100644
--- a/camel/camel-service.c
+++ b/camel/camel-service.c
@@ -38,6 +38,8 @@
#include "e-util/e-msgport.h"
#endif
+#include "e-util/e-host-utils.h"
+
#include "camel-service.h"
#include "camel-session.h"
#include "camel-exception.h"
@@ -480,7 +482,6 @@ struct hostent *
camel_service_gethost (CamelService *service, CamelException *ex)
{
char *hostname;
- struct hostent *h;
if (service->url->host)
hostname = service->url->host;
@@ -504,9 +505,6 @@ struct _lookup_msg {
int result;
int herr;
struct hostent hostbuf;
-#ifndef GETHOSTBYNAME_R_FIVE_ARGS
- struct hostent *hp;
-#endif
int hostbuflen;
char *hostbufmem;
};
@@ -516,11 +514,7 @@ get_host(void *data)
{
struct _lookup_msg *info = data;
-#ifdef GETHOSTBYNAME_R_FIVE_ARGS
- while (gethostbyname_r(info->name, &info->hostbuf, info->hostbufmem, info->hostbuflen, &info->herr) && info->herr == ERANGE) {
-#else
- while ((info->result = gethostbyname_r(info->name, &info->hostbuf, info->hostbufmem, info->hostbuflen, &info->hp, &info->herr)) == ERANGE) {
-#endif
+ while ((info->result = e_gethostbyname_r(info->name, &info->hostbuf, info->hostbufmem, info->hostbuflen, &info->herr)) == ERANGE) {
d(printf("gethostbyname fialed?\n"));
#ifdef ENABLE_THREADS
pthread_testcancel();