Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libc/net check address family on getting entries from /e...



details:   https://anonhg.NetBSD.org/src/rev/11eec5978ebe
branches:  trunk
changeset: 474389:11eec5978ebe
user:      itojun <itojun%NetBSD.org@localhost>
date:      Sun Jul 04 22:44:28 1999 +0000

description:
check address family on getting entries from /etc/hosts.

diffstat:

 lib/libc/net/gethnamaddr.c |  12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diffs (44 lines):

diff -r de2d2da84729 -r 11eec5978ebe lib/libc/net/gethnamaddr.c
--- a/lib/libc/net/gethnamaddr.c        Sun Jul 04 22:33:54 1999 +0000
+++ b/lib/libc/net/gethnamaddr.c        Sun Jul 04 22:44:28 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: gethnamaddr.c,v 1.19 1999/07/01 16:43:18 itojun Exp $  */
+/*     $NetBSD: gethnamaddr.c,v 1.20 1999/07/04 22:44:28 itojun Exp $  */
 
 /*
  * ++Copyright++ 1985, 1988, 1993
@@ -61,7 +61,7 @@
 static char sccsid[] = "@(#)gethostnamadr.c    8.1 (Berkeley) 6/4/93";
 static char rcsid[] = "Id: gethnamaddr.c,v 8.21 1997/06/01 20:34:37 vixie Exp ";
 #else
-__RCSID("$NetBSD: gethnamaddr.c,v 1.19 1999/07/01 16:43:18 itojun Exp $");
+__RCSID("$NetBSD: gethnamaddr.c,v 1.20 1999/07/04 22:44:28 itojun Exp $");
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -762,21 +762,21 @@
 {
        struct hostent *hp;
        const char *name;
-#ifdef notyet
        int len, af;
-#endif
 
        name = va_arg(ap, char *);
-#ifdef notyet
        len = va_arg(ap, int);
        af = va_arg(ap, int);
-#endif
 
        hp = NULL;
+#if 0
        if (_res.options & RES_USE_INET6)
                hp = _gethtbyname2(name, AF_INET6);
        if (hp==NULL)
                hp = _gethtbyname2(name, AF_INET);
+#else
+       hp = _gethtbyname2(name, af);
+#endif
        *((struct hostent **)rv) = hp;
        if (hp==NULL) {
                h_errno = HOST_NOT_FOUND;



Home | Main Index | Thread Index | Old Index