=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ftp/fetch.c,v retrieving revision 1.43 retrieving revision 1.44 diff -c -r1.43 -r1.44 *** src/usr.bin/ftp/fetch.c 2003/02/17 18:51:11 1.43 --- src/usr.bin/ftp/fetch.c 2003/03/10 06:20:10 1.44 *************** *** 1,4 **** ! /* $OpenBSD: fetch.c,v 1.43 2003/02/17 18:51:11 millert Exp $ */ /* $NetBSD: fetch.c,v 1.14 1997/08/18 10:20:20 lukem Exp $ */ /*- --- 1,4 ---- ! /* $OpenBSD: fetch.c,v 1.44 2003/03/10 06:20:10 itojun Exp $ */ /* $NetBSD: fetch.c,v 1.14 1997/08/18 10:20:20 lukem Exp $ */ /*- *************** *** 38,44 **** */ #ifndef lint ! static char rcsid[] = "$OpenBSD: fetch.c,v 1.43 2003/02/17 18:51:11 millert Exp $"; #endif /* not lint */ /* --- 38,44 ---- */ #ifndef lint ! static char rcsid[] = "$OpenBSD: fetch.c,v 1.44 2003/03/10 06:20:10 itojun Exp $"; #endif /* not lint */ /* *************** *** 107,113 **** volatile int s, out; size_t len; char *cp, *ep, *portnum, *path; ! char pbuf[NI_MAXSERV]; const char * volatile savefile; char *line, *host, *port, *buf; char * volatile proxy; --- 107,113 ---- volatile int s, out; size_t len; char *cp, *ep, *portnum, *path; ! char pbuf[NI_MAXSERV], hbuf[NI_MAXHOST]; const char * volatile savefile; char *line, *host, *port, *buf; char * volatile proxy; *************** *** 309,318 **** s = -1; for (res = res0; res; res = res->ai_next) { ! getnameinfo(res->ai_addr, res->ai_addrlen, pbuf, sizeof(pbuf), ! NULL, 0, NI_NUMERICHOST); if (verbose) ! fprintf(ttyout, "Trying %s...\n", pbuf); s = socket(res->ai_family, res->ai_socktype, res->ai_protocol); if (s == -1) { --- 309,319 ---- s = -1; for (res = res0; res; res = res->ai_next) { ! if (getnameinfo(res->ai_addr, res->ai_addrlen, hbuf, ! sizeof(hbuf), NULL, 0, NI_NUMERICHOST) != 0) ! strlcpy(hbuf, "(unknown)", sizeof(hbuf)); if (verbose) ! fprintf(ttyout, "Trying %s...\n", hbuf); s = socket(res->ai_family, res->ai_socktype, res->ai_protocol); if (s == -1) {