From 378949dbcae85fd56a37d74577140d2a7b9bcbbb Mon Sep 17 00:00:00 2001 From: Brian Feldman Date: Mon, 21 Jun 1999 02:38:16 +0000 Subject: [PATCH] This fixes the problem of cancelling an FTP transfer resulting in a bogus error ("parsing URI".) I also fixed an inconsistency in another fs_status. --- usr.bin/fetch/ftp.c | 5 ++++- usr.bin/fetch/http.c | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/usr.bin/fetch/ftp.c b/usr.bin/fetch/ftp.c index 5e40848136a..f2f2640e563 100644 --- a/usr.bin/fetch/ftp.c +++ b/usr.bin/fetch/ftp.c @@ -26,7 +26,7 @@ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: ftp.c,v 1.12 1999/02/03 20:43:29 fenner Exp $ + * $Id: ftp.c,v 1.13 1999/02/05 01:01:17 fenner Exp $ */ #include @@ -348,6 +348,7 @@ ftp_retrieve(struct fetch_state *fs) time_t modtime; size_t readresult, writeresult; + fs->fs_status = "logging in to FTP server"; ftp = ftpLogin(ftps->ftp_hostname, (char *)(ftps->ftp_user ? ftps->ftp_user : "anonymous"), /* XXX ^^^^ bad API */ @@ -358,6 +359,7 @@ ftp_retrieve(struct fetch_state *fs) status ? ftpErrString(status) : hstrerror(h_errno)); return EX_IOERR; } + fs->fs_status = "preparing for FTP transfer"; if (ftps->ftp_type && strcasecmp(ftps->ftp_type, "i") != 0) { if (strcasecmp(ftps->ftp_type, "a") == 0) ftpAscii(ftp); @@ -432,6 +434,7 @@ ftp_retrieve(struct fetch_state *fs) } } + fs->fs_status = "retrieving file from FTP server"; remote = ftpGet(ftp, ftps->ftp_remote_file, &seekloc); if (remote == 0) { if (ftpErrno(ftp)) { diff --git a/usr.bin/fetch/http.c b/usr.bin/fetch/http.c index 7851b387d3e..0805e271667 100644 --- a/usr.bin/fetch/http.c +++ b/usr.bin/fetch/http.c @@ -26,7 +26,7 @@ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: http.c,v 1.26 1999/02/23 18:51:13 wollman Exp $ + * $Id: http.c,v 1.27 1999/05/18 19:37:37 jmg Exp $ */ #include @@ -661,7 +661,7 @@ got100reply: unsetup_sigalrm(); return EX_OSERR; } - fs->fs_status = "retrieving from HTTP/0.9 server"; + fs->fs_status = "retrieving file from HTTP/0.9 server"; display(fs, -1, 0); do {