Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/ftp use NI_MAXHOST with getnameinfo. we can assume ...
details: https://anonhg.NetBSD.org/src/rev/38eb9c622d44
branches: trunk
changeset: 499262:38eb9c622d44
user: itojun <itojun%NetBSD.org@localhost>
date: Wed Nov 15 04:09:19 2000 +0000
description:
use NI_MAXHOST with getnameinfo. we can assume presense of getnameinfo.
diffstat:
usr.bin/ftp/ftp.c | 10 ++++------
1 files changed, 4 insertions(+), 6 deletions(-)
diffs (46 lines):
diff -r efd477864036 -r 38eb9c622d44 usr.bin/ftp/ftp.c
--- a/usr.bin/ftp/ftp.c Wed Nov 15 04:07:07 2000 +0000
+++ b/usr.bin/ftp/ftp.c Wed Nov 15 04:09:19 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ftp.c,v 1.110 2000/10/11 14:46:03 is Exp $ */
+/* $NetBSD: ftp.c,v 1.111 2000/11/15 04:09:19 itojun Exp $ */
/*-
* Copyright (c) 1996-2000 The NetBSD Foundation, Inc.
@@ -103,7 +103,7 @@
#if 0
static char sccsid[] = "@(#)ftp.c 8.6 (Berkeley) 10/27/94";
#else
-__RCSID("$NetBSD: ftp.c,v 1.110 2000/10/11 14:46:03 is Exp $");
+__RCSID("$NetBSD: ftp.c,v 1.111 2000/11/15 04:09:19 itojun Exp $");
#endif
#endif /* not lint */
@@ -1609,10 +1609,8 @@
warn("listen");
if (sendport) {
-#ifdef INET6
- char hname[INET6_ADDRSTRLEN];
+ char hname[NI_MAXHOST];
int af;
-#endif
switch (data_addr.su_family) {
case AF_INET:
@@ -1623,6 +1621,7 @@
/* FALLTHROUGH */
#ifdef INET6
case AF_INET6:
+#endif
af = (data_addr.su_family == AF_INET) ? 1 : 2;
if (getnameinfo((struct sockaddr *)&data_addr.si_su,
data_addr.su_len, hname, sizeof(hname), NULL, 0,
@@ -1642,7 +1641,6 @@
}
}
break;
-#endif
default:
result = COMPLETE + 1;
break;
Home |
Main Index |
Thread Index |
Old Index