diff options
| author | Jordan K. Hubbard <jkh@FreeBSD.org> | 1997-10-03 14:00:09 +0000 |
|---|---|---|
| committer | Jordan K. Hubbard <jkh@FreeBSD.org> | 1997-10-03 14:00:09 +0000 |
| commit | 7fd698d73205155e5a78fdbd91a55c649276c7a0 (patch) | |
| tree | d231baadc3192c84e0883e4796d3d1e8d789f7c8 | |
| parent | c5c1c13516eedd856019b886ca65e9f69538bc56 (diff) | |
Notes
| -rw-r--r-- | release/sysinstall/ftp.c | 10 | ||||
| -rw-r--r-- | usr.sbin/sysinstall/ftp.c | 10 |
2 files changed, 12 insertions, 8 deletions
diff --git a/release/sysinstall/ftp.c b/release/sysinstall/ftp.c index 74fd5938b3a2..3c91b7484b8c 100644 --- a/release/sysinstall/ftp.c +++ b/release/sysinstall/ftp.c @@ -4,7 +4,7 @@ * This is probably the last attempt in the `sysinstall' line, the next * generation being slated to essentially a complete rewrite. * - * $Id: ftp.c,v 1.32 1997/02/22 14:11:42 peter Exp $ + * $Id: ftp.c,v 1.33 1997/10/03 03:32:03 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -197,12 +197,14 @@ mediaGetFTP(Device *dev, char *file, Boolean probe) try = file; while ((fp = ftpGet(OpenConn, try, 0)) == NULL) { + int ftperr = ftpErrno(OpenConn); + /* If a hard fail, try to "bounce" the ftp server to clear it */ - if (ftpErrno(OpenConn) != 550) { - dev->shutdown(dev); - if (ftpErrno(OpenConn) != 421) /* Timeout? */ + if (ftperr != 550) { + if (ftperr != 421) /* Timeout? */ variable_unset(VAR_FTP_PATH); /* If we can't re-initialize, just forget it */ + dev->shutdown(dev); if (!dev->init(dev)) { netDown(dev); fclose(OpenConn); diff --git a/usr.sbin/sysinstall/ftp.c b/usr.sbin/sysinstall/ftp.c index 74fd5938b3a2..3c91b7484b8c 100644 --- a/usr.sbin/sysinstall/ftp.c +++ b/usr.sbin/sysinstall/ftp.c @@ -4,7 +4,7 @@ * This is probably the last attempt in the `sysinstall' line, the next * generation being slated to essentially a complete rewrite. * - * $Id: ftp.c,v 1.32 1997/02/22 14:11:42 peter Exp $ + * $Id: ftp.c,v 1.33 1997/10/03 03:32:03 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -197,12 +197,14 @@ mediaGetFTP(Device *dev, char *file, Boolean probe) try = file; while ((fp = ftpGet(OpenConn, try, 0)) == NULL) { + int ftperr = ftpErrno(OpenConn); + /* If a hard fail, try to "bounce" the ftp server to clear it */ - if (ftpErrno(OpenConn) != 550) { - dev->shutdown(dev); - if (ftpErrno(OpenConn) != 421) /* Timeout? */ + if (ftperr != 550) { + if (ftperr != 421) /* Timeout? */ variable_unset(VAR_FTP_PATH); /* If we can't re-initialize, just forget it */ + dev->shutdown(dev); if (!dev->init(dev)) { netDown(dev); fclose(OpenConn); |
