diff options
author | phk <phk@FreeBSD.org> | 1995-05-24 18:35:10 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 1995-05-24 18:35:10 +0000 |
commit | 15cca3b08a90a557a4cbe3be5a4b513df6e8852f (patch) | |
tree | f96f89cece06c0f7498e20b9dcc85028284638ea /usr.sbin/sysinstall/ftp.c | |
parent | 3134475f4a6bfe780c3bc3978303494fde054480 (diff) | |
download | FreeBSD-src-15cca3b08a90a557a4cbe3be5a4b513df6e8852f.zip FreeBSD-src-15cca3b08a90a557a4cbe3be5a4b513df6e8852f.tar.gz |
Close the transfer socket.
Diffstat (limited to 'usr.sbin/sysinstall/ftp.c')
-rw-r--r-- | usr.sbin/sysinstall/ftp.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.sbin/sysinstall/ftp.c b/usr.sbin/sysinstall/ftp.c index 1de9902..0564aea 100644 --- a/usr.sbin/sysinstall/ftp.c +++ b/usr.sbin/sysinstall/ftp.c @@ -6,7 +6,7 @@ * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp * ---------------------------------------------------------------------------- * - * $Id: ftp.c,v 1.5 1995/05/24 17:49:14 jkh Exp $ + * $Id: ftp.c,v 1.6 1995/05/24 18:21:48 jkh Exp $ * */ @@ -146,6 +146,7 @@ FtpInit() return ftp; memset(ftp, 0, sizeof *ftp); ftp->fd_ctrl = -1; + ftp->fd_extr = -1; ftp->fd_debug = -1; ftp->state = init; return ftp; @@ -301,6 +302,7 @@ FtpGet(FTP_t ftp, char *file) if (i > 299) return -1; ftp->state = xfer; + ftp->fd_xfer = s; return s; } else { return -1; @@ -312,6 +314,8 @@ FtpEOF(FTP_t ftp) { if (ftp->state != xfer) return botch(ftp,"FtpEOF","xfer"); + close(ftp->fd_extr); + ftp->fd_extr = -1; ftp->state = isopen; return get_a_number(ftp,0); } |