Always call the designated close method, instead of assuming it is
tcp_close_file(). This isn't the case for FTP, which also needs to
manage the control connection.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
void tcp_close_file(struct inode *inode)
{
struct pxe_pvt_inode *socket = PVT(inode);
+
if (socket->buf) {
netbuf_delete(socket->buf);
socket->buf = NULL;
socket->tftp_goteof = 1;
if (inode->size == -1)
inode->size = socket->tftp_filepos;
- tcp_close_file(inode);
+ socket->close(inode);
return;
}
}