From c9c621c36ada7907b7040953fdf6356ad5a8725b Mon Sep 17 00:00:00 2001 From: ache Date: Thu, 14 Nov 1996 07:06:25 +0000 Subject: Change to new ftpLogin interface Now clearly say: Not logged in instead of old: Broken pipe (note it was original reason for all my libftpio changes) --- usr.bin/fetch/main.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'usr.bin') diff --git a/usr.bin/fetch/main.c b/usr.bin/fetch/main.c index 6f4d85c..2f60719 100644 --- a/usr.bin/fetch/main.c +++ b/usr.bin/fetch/main.c @@ -24,7 +24,7 @@ * SUCH DAMAGE. */ -/* $Id: main.c,v 1.26 1996/10/31 14:24:35 phk Exp $ */ +/* $Id: main.c,v 1.27 1996/11/10 14:46:50 peter Exp $ */ #include #include @@ -301,9 +301,13 @@ ftpget() } if ((lp = getenv("FTP_LOGIN")) == NULL) lp = "anonymous"; - ftp = ftpLogin(host, lp, ftp_pw, 0, ftp_verbose); - if (!ftp) - err(1, "couldn't open FTP connection or login to %s.", host); + ftp = ftpLogin(host, lp, ftp_pw, 0, ftp_verbose, &status); + if (!ftp) { + if (status) + errx(1, "%s: %s", host, ftpErrString(status)); + else + err(1, "couldn't open FTP connection to %s.", host); + } /* Time to set our defaults */ ftpBinary (ftp); -- cgit v1.1