mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-14 10:09:48 +00:00
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.
This commit is contained in:
parent
60ff97b002
commit
378949dbca
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=48060
@ -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 <sys/types.h>
|
||||
@ -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)) {
|
||||
|
@ -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 <sys/types.h>
|
||||
@ -661,7 +661,7 @@ http_retrieve(struct fetch_state *fs)
|
||||
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 {
|
||||
|
Loading…
Reference in New Issue
Block a user