summaryrefslogtreecommitdiffstats
path: root/usr.sbin/sysinstall/ftp.c
diff options
context:
space:
mode:
authorjkh <jkh@FreeBSD.org>1997-02-18 01:35:37 +0000
committerjkh <jkh@FreeBSD.org>1997-02-18 01:35:37 +0000
commitf8ba92686c79904b621ef93c6d9c5c95a864ef87 (patch)
tree4869bfd6c9c1dc811b08e480627eb570e717af8b /usr.sbin/sysinstall/ftp.c
parente789280b99d3342982e2584806014c0e69f97d7e (diff)
downloadFreeBSD-src-f8ba92686c79904b621ef93c6d9c5c95a864ef87.zip
FreeBSD-src-f8ba92686c79904b621ef93c6d9c5c95a864ef87.tar.gz
Don't just unset FTP_PATH unilaterally, it might have been a timeout
in which case we should simply log in again.
Diffstat (limited to 'usr.sbin/sysinstall/ftp.c')
-rw-r--r--usr.sbin/sysinstall/ftp.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/usr.sbin/sysinstall/ftp.c b/usr.sbin/sysinstall/ftp.c
index 3814dc2..3b4b01d 100644
--- a/usr.sbin/sysinstall/ftp.c
+++ b/usr.sbin/sysinstall/ftp.c
@@ -190,19 +190,17 @@ mediaGetFTP(Device *dev, char *file, Boolean probe)
while ((fp = ftpGet(OpenConn, try, 0)) == NULL) {
/* If a hard fail, try to "bounce" the ftp server to clear it */
if (ftpErrno(OpenConn) != 550) {
- char *cp = variable_get(VAR_FTP_PATH);
-
dev->shutdown(dev);
- variable_unset(VAR_FTP_PATH);
+ if (ftpErrno(OpenConn) != 421)) /* Timeout? */
+ variable_unset(VAR_FTP_PATH);
/* If we can't re-initialize, just forget it */
if (!dev->init(dev)) {
netDown(dev);
fclose(OpenConn);
OpenConn = NULL;
+ variable_unset(VAR_FTP_PATH);
return NULL;
}
- else
- variable_set2(VAR_FTP_PATH, cp);
}
else if (probe)
return NULL;
OpenPOWER on IntegriCloud