diff options
author | jkh <jkh@FreeBSD.org> | 1997-10-03 14:00:09 +0000 |
---|---|---|
committer | jkh <jkh@FreeBSD.org> | 1997-10-03 14:00:09 +0000 |
commit | 19305dda388757cb1346a42b73ad422a2ea59e6c (patch) | |
tree | 20709f1e487f44b40bf9237c7fd5d7a09e0f760d /usr.sbin/sysinstall/ftp.c | |
parent | 724c03ee75ea729d17150be50fc842f79c37fd60 (diff) | |
download | FreeBSD-src-19305dda388757cb1346a42b73ad422a2ea59e6c.zip FreeBSD-src-19305dda388757cb1346a42b73ad422a2ea59e6c.tar.gz |
Don't attempt to deref OpenConn after it's been set to NULL. :)
Diffstat (limited to 'usr.sbin/sysinstall/ftp.c')
-rw-r--r-- | usr.sbin/sysinstall/ftp.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/usr.sbin/sysinstall/ftp.c b/usr.sbin/sysinstall/ftp.c index 74fd593..3c91b748 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); |