summaryrefslogtreecommitdiff
path: root/usr.bin/ftp
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>1997-08-06 17:35:43 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>1997-08-06 17:35:43 +0000
commit54363a745c2c696c69d8d1cc132acb4662b14c96 (patch)
treea6d70b06ee2787058ca3f09e006eb0df9b7ffaf0 /usr.bin/ftp
parent5b3b7fc8525f652b426f561740d8880ec38b76f0 (diff)
proper msgs display w/ -r
Diffstat (limited to 'usr.bin/ftp')
-rw-r--r--usr.bin/ftp/ftp.c9
-rw-r--r--usr.bin/ftp/main.c7
2 files changed, 9 insertions, 7 deletions
diff --git a/usr.bin/ftp/ftp.c b/usr.bin/ftp/ftp.c
index 3057d1095de..14e339de700 100644
--- a/usr.bin/ftp/ftp.c
+++ b/usr.bin/ftp/ftp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ftp.c,v 1.20 1997/07/25 21:56:21 millert Exp $ */
+/* $OpenBSD: ftp.c,v 1.21 1997/08/06 17:35:41 mickey Exp $ */
/* $NetBSD: ftp.c,v 1.26 1997/07/20 09:45:53 lukem Exp $ */
/*
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)ftp.c 8.6 (Berkeley) 10/27/94";
#else
-static char rcsid[] = "$OpenBSD: ftp.c,v 1.20 1997/07/25 21:56:21 millert Exp $";
+static char rcsid[] = "$OpenBSD: ftp.c,v 1.21 1997/08/06 17:35:41 mickey Exp $";
#endif
#endif /* not lint */
@@ -320,8 +320,9 @@ getreply(expecteof)
return (4);
}
if (c != '\r' && (verbose > 0 ||
- (verbose > -1 && n == '5' && dig > 4)) &&
- (n < '5' || !retry_connect)) {
+ ((verbose > -1 && n == '5' && dig > 4)) &&
+ (((!n && c < '5') || (n && n < '5'))
+ || !retry_connect))) {
if (proxflag &&
(dig == 1 || (dig == 5 && verbose == 0)))
fprintf(ttyout, "%s:", hostname);
diff --git a/usr.bin/ftp/main.c b/usr.bin/ftp/main.c
index 93efb670a55..626b0b6cee6 100644
--- a/usr.bin/ftp/main.c
+++ b/usr.bin/ftp/main.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: main.c,v 1.34 1997/07/25 21:56:22 millert Exp $ */
+/* $OpenBSD: main.c,v 1.35 1997/08/06 17:35:42 mickey Exp $ */
/* $NetBSD: main.c,v 1.23 1997/07/20 09:45:58 lukem Exp $ */
/*
@@ -44,7 +44,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)main.c 8.6 (Berkeley) 10/9/94";
#else
-static char rcsid[] = "$OpenBSD: main.c,v 1.34 1997/07/25 21:56:22 millert Exp $";
+static char rcsid[] = "$OpenBSD: main.c,v 1.35 1997/08/06 17:35:42 mickey Exp $";
#endif
#endif /* not lint */
@@ -252,6 +252,7 @@ main(argc, argv)
sleep(retry_connect);
}
} while (!connected);
+ retry_connect = 0; /* connected, stop hiding msgs */
}
}
#ifndef SMALL
@@ -665,7 +666,7 @@ void
usage()
{
(void)fprintf(stderr,
- "usage: %s [-adeginprtvV] [host [port]]\n"
+ "usage: %s [-adeginptvV] [-r <seconds>] [host [port]]\n"
" %s host:path[/]\n"
" %s ftp://host[:port]/path[/]\n"
" %s http://host[:port]/file\n",