aboutsummaryrefslogtreecommitdiffstats
path: root/e-util
diff options
context:
space:
mode:
Diffstat (limited to 'e-util')
-rw-r--r--e-util/ChangeLog11
-rw-r--r--e-util/e-host-utils.c7
2 files changed, 17 insertions, 1 deletions
diff --git a/e-util/ChangeLog b/e-util/ChangeLog
index 6c0a558e3d..cb5df43d2d 100644
--- a/e-util/ChangeLog
+++ b/e-util/ChangeLog
@@ -1,3 +1,14 @@
+2001-05-19 Ettore Perazzoli <ettore@ximian.com>
+
+ * e-host-utils.c (e_gethostbyname_r)
+ [HAVE_GETHOSTBYNAME_R && GETHOSTBYNAME_R_FIVE_ARGS]: Set `*herr'
+ to zero if the function returns a non-NULL pointer to the hostent.
+ According to the docs, a returned non-NULL hostent always means
+ "no error" no matter what the returned value of `herr' is. [And
+ in fact, at least on libc 2.2.3, trying to resolve `localhost'
+ sets herr to `HOST_NOT_FOUND' even if the name is resolved
+ correctly and the returned hostent is non-NULL.]
+
2001-05-16 Dan Winship <danw@ximian.com>
* e-html-utils.c (e_text_to_html_full): add
diff --git a/e-util/e-host-utils.c b/e-util/e-host-utils.c
index d20261e5a6..108a732b83 100644
--- a/e-util/e-host-utils.c
+++ b/e-util/e-host-utils.c
@@ -57,7 +57,12 @@ e_gethostbyname_r (const char *name, struct hostent *host,
return errno;
#else
struct hostent *hp;
- return gethostbyname_r(name, host, buf, buflen, &hp, herr);
+ int retval;
+
+ retval = gethostbyname_r(name, host, buf, buflen, &hp, herr);
+ if (hp != NULL)
+ *herr = 0;
+ return retval;
#endif
#else
int i;