summaryrefslogtreecommitdiffstats
path: root/usr.bin
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>1996-11-14 07:06:25 +0000
committerache <ache@FreeBSD.org>1996-11-14 07:06:25 +0000
commitc9c621c36ada7907b7040953fdf6356ad5a8725b (patch)
tree971a25712575cecc1331701766db062cda98e3d1 /usr.bin
parent22406d98dcada3e438c6d4b3b707192f7fb71969 (diff)
downloadFreeBSD-src-c9c621c36ada7907b7040953fdf6356ad5a8725b.zip
FreeBSD-src-c9c621c36ada7907b7040953fdf6356ad5a8725b.tar.gz
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)
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/fetch/main.c12
1 files changed, 8 insertions, 4 deletions
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 <sys/types.h>
#include <sys/socket.h>
@@ -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);
OpenPOWER on IntegriCloud