aboutsummaryrefslogtreecommitdiffstats
path: root/core/fs/pxe/tcp.c
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2011-04-24 12:44:31 -0700
committerH. Peter Anvin <hpa@zytor.com>2011-04-24 12:46:07 -0700
commite23631e677369defe61a300c728f0bb6a345b7db (patch)
treecbeb97373b05ec22a17a29626ec8290bfc33c1c6 /core/fs/pxe/tcp.c
parentd05e01cf06aac976a2ba274ec7a0fbd9830782a6 (diff)
downloadsyslinux-e23631e677369defe61a300c728f0bb6a345b7db.tar.gz
syslinux-e23631e677369defe61a300c728f0bb6a345b7db.tar.xz
syslinux-e23631e677369defe61a300c728f0bb6a345b7db.zip
pxe: tcp: always call the close method
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>
Diffstat (limited to 'core/fs/pxe/tcp.c')
-rw-r--r--core/fs/pxe/tcp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/fs/pxe/tcp.c b/core/fs/pxe/tcp.c
index af0cffcb..109f803d 100644
--- a/core/fs/pxe/tcp.c
+++ b/core/fs/pxe/tcp.c
@@ -24,6 +24,7 @@
void tcp_close_file(struct inode *inode)
{
struct pxe_pvt_inode *socket = PVT(inode);
+
if (socket->buf) {
netbuf_delete(socket->buf);
socket->buf = NULL;
@@ -55,7 +56,7 @@ void tcp_fill_buffer(struct inode *inode)
socket->tftp_goteof = 1;
if (inode->size == -1)
inode->size = socket->tftp_filepos;
- tcp_close_file(inode);
+ socket->close(inode);
return;
}
}