From 0d02d85bb452a1a8c180b541cfac5622ad8406a4 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Sat, 19 Sep 1998 22:38:57 +0000 Subject: make the progress meter run correctly in all cases if in -m mode --- usr.bin/ftp/util.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'usr.bin') 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; } -- cgit v1.2.3