Date: Sat, 20 May 2000 09:15:34 +0200 (CEST) From: cejkar@dcse.fee.vutbr.cz To: FreeBSD-gnats-submit@freebsd.org Subject: bin/18688: libfetch: Restart does not work in active FTP mode (r.: des) Message-ID: <200005200715.e4K7FY712821@kazi.dcse.fee.vutbr.cz>
next in thread | raw e-mail | index | archive | help
>Number: 18688 >Category: bin >Synopsis: libfetch: Restart does not work in active FTP mode (r.: des) >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat May 20 00:20:01 PDT 2000 >Closed-Date: >Last-Modified: >Originator: Rudolf Cejka >Release: FreeBSD 4.0-CURRENT i386 >Organization: Brno University of Technology, FEE&CS, Czech Republic >Environment: 5.0-CURRENT >Description: In libfetch, there is restart capability (data downloading with begin somewhere in the middle of the file) for HTTP and passive FTP mode. But when active FTP mode is used, restart does not work. It is because lines performing REST command were added only to passive FTP mode section, whereas in active FTP mode these lines are missing. >How-To-Repeat: >Fix: Hmm. It looks that branching in lib/libfetch/ftp.c,v is broken: # co lib/libfetch/ftp.c,v lib/libfetch/ftp.c,v --> ftp.c revision 1.20 done But retrieved file is revision 1.19: $FreeBSD: src/lib/libfetch/ftp.c,v 1.19 2000/05/15 08:24:58 des Exp $ Here is simple patch adding restart capability to active ftp mode: --- ftp.c.orig Fri May 19 22:00:43 2000 +++ ftp.c Fri May 19 22:10:01 2000 @@ -303,6 +303,11 @@ if (e != FTP_OK) goto ouch; + /* seek to required offset */ + if (offset) + if (_ftp_cmd(cd, "REST %lu", (u_long)offset) != FTP_FILE_OK) + goto sysouch; + /* make the server initiate the transfer */ if (verbose) _fetch_info("initiating transfer"); >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200005200715.e4K7FY712821>