[syslinux:lwip] pxe: tcp: always call the close method
syslinux-bot for H. Peter Anvin
hpa at zytor.com
Sun Apr 24 21:03:22 PDT 2011
Commit-ID: e23631e677369defe61a300c728f0bb6a345b7db
Gitweb: http://syslinux.zytor.com/commit/e23631e677369defe61a300c728f0bb6a345b7db
Author: H. Peter Anvin <hpa at zytor.com>
AuthorDate: Sun, 24 Apr 2011 12:44:31 -0700
Committer: H. Peter Anvin <hpa at zytor.com>
CommitDate: Sun, 24 Apr 2011 12:46:07 -0700
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 at zytor.com>
---
core/fs/pxe/tcp.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/core/fs/pxe/tcp.c b/core/fs/pxe/tcp.c
index af0cffc..109f803 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;
}
}
More information about the Syslinux-commits
mailing list