diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 1998-09-19 22:38:57 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 1998-09-19 22:38:57 +0000 |
commit | 0d02d85bb452a1a8c180b541cfac5622ad8406a4 (patch) | |
tree | aca8242b9037820f7bf68511d61304aeb0aec7db | |
parent | e4375a41f732f9258f20b5a6602514f804152b06 (diff) |
make the progress meter run correctly in all cases if in -m mode
-rw-r--r-- | usr.bin/ftp/util.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/usr.bin/ftp/util.c b/usr.bin/ftp/util.c index 8e44146637d..3f80cecfca8 100644 --- a/usr.bin/ftp/util.c +++ b/usr.bin/ftp/util.c @@ -1,4 +1,4 @@ -/* $OpenBSD: util.c,v 1.19 1998/05/13 08:59:10 deraadt Exp $ */ +/* $OpenBSD: util.c,v 1.20 1998/09/19 22:38:56 millert Exp $ */ /* $NetBSD: util.c,v 1.12 1997/08/18 10:20:27 lukem Exp $ */ /* @@ -35,7 +35,7 @@ */ #ifndef lint -static char rcsid[] = "$OpenBSD: util.c,v 1.19 1998/05/13 08:59:10 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: util.c,v 1.20 1998/09/19 22:38:56 millert Exp $"; #endif /* not lint */ /* @@ -63,6 +63,8 @@ static char rcsid[] = "$OpenBSD: util.c,v 1.19 1998/05/13 08:59:10 deraadt Exp $ #include "ftp_var.h" #include "pathnames.h" +static void updateprogressmeter __P((int)); + /* * Connect to peer server and * auto-login, if possible. @@ -599,15 +601,14 @@ foregroundproc() ctty_pgrp == pgrp)); } -void updateprogressmeter __P((int)); - -void +static void updateprogressmeter(dummy) int dummy; { int save_errno = errno; - if (foregroundproc()) + /* update progressmeter if foreground process or in -m mode */ + if (foregroundproc() || progress == -1) progressmeter(0); errno = save_errno; } |