diff options
author | jkh <jkh@FreeBSD.org> | 1997-01-18 19:18:26 +0000 |
---|---|---|
committer | jkh <jkh@FreeBSD.org> | 1997-01-18 19:18:26 +0000 |
commit | 37838c93f6be5a90dc35b8fa3449218806fc0c1f (patch) | |
tree | 3f735b8eee63e6fa439e011bca14e2293b5de0cd /usr.sbin/sysinstall/ftp.c | |
parent | ee10277a8bc9d2921407623da8597b7eafec720b (diff) | |
download | FreeBSD-src-37838c93f6be5a90dc35b8fa3449218806fc0c1f.zip FreeBSD-src-37838c93f6be5a90dc35b8fa3449218806fc0c1f.tar.gz |
Fix a variety of problems with my timeout handling, make it more
configurable (you can now set the timeout interval), fix a crash-bug
when no network device was attached.
Diffstat (limited to 'usr.sbin/sysinstall/ftp.c')
-rw-r--r-- | usr.sbin/sysinstall/ftp.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/usr.sbin/sysinstall/ftp.c b/usr.sbin/sysinstall/ftp.c index 07c4528..f83dfda 100644 --- a/usr.sbin/sysinstall/ftp.c +++ b/usr.sbin/sysinstall/ftp.c @@ -67,7 +67,7 @@ mediaInitFTP(Device *dev) } /* If we can't initialize the network, bag it! */ - if (!netdev->init(netdev)) + if (netdev && !netdev->init(netdev)) return FALSE; try: @@ -75,7 +75,8 @@ try: if (!cp) { if (DITEM_STATUS(mediaSetFTP(NULL)) == DITEM_FAILURE || (cp = variable_get(VAR_FTP_PATH)) == NULL) { msgConfirm("Unable to get proper FTP path. FTP media not initialized."); - netdev->shutdown(netdev); + if (netdev) + netdev->shutdown(netdev); return FALSE; } } @@ -84,7 +85,8 @@ try: dir = variable_get(VAR_FTP_DIR); if (!hostname || !dir) { msgConfirm("Missing FTP host or directory specification. FTP media not initialized,"); - netdev->shutdown(netdev); + if (netdev) + netdev->shutdown(netdev); return FALSE; } user = variable_get(VAR_FTP_USER); @@ -147,7 +149,8 @@ punt: fclose(OpenConn); OpenConn = NULL; } - netdev->shutdown(netdev); + if (netdev) + netdev->shutdown(netdev); variable_unset(VAR_FTP_PATH); return FALSE; } @@ -223,6 +226,6 @@ mediaShutdownFTP(Device *dev) fclose(OpenConn); OpenConn = NULL; } - /* netdev->shutdown(netdev); */ + /* if (netdev) netdev->shutdown(netdev); */ ftpInitted = FALSE; } |