diff options
| author | Michael Brown | 2009-07-06 17:16:59 +0200 |
|---|---|---|
| committer | Michael Brown | 2009-07-06 17:16:59 +0200 |
| commit | b7e93a6a55cadbf14fc0fc8f797d2f576c0c5dda (patch) | |
| tree | 710f9f9df383f01722bf854f6ae0003bb4c204cf /src/core/open.c | |
| parent | [pxe] Add startpxe and stoppxe commands (diff) | |
| download | ipxe-b7e93a6a55cadbf14fc0fc8f797d2f576c0c5dda.tar.gz ipxe-b7e93a6a55cadbf14fc0fc8f797d2f576c0c5dda.tar.xz ipxe-b7e93a6a55cadbf14fc0fc8f797d2f576c0c5dda.zip | |
[xfer] Always nullify interface while sending close() message
Objects typically call xfer_close() as part of their response to a
close() message. If the initiating object has already nullified the
xfer interface then this isn't a problem, but it can lead to
unexpected behaviour when the initiating object is aiming to reuse the
connection and so does not nullify the interface.
Fix by always temporarily nullifying the interface during xfer_close()
(as was already being done by xfer_vreopen() in order to work around
this specific problem).
Reported-by: infernix <infernix@infernix.net>
Tested-by: infernix <infernix@infernix.net>
Diffstat (limited to 'src/core/open.c')
| -rw-r--r-- | src/core/open.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/src/core/open.c b/src/core/open.c index d5eb30cfa..70b427ba2 100644 --- a/src/core/open.c +++ b/src/core/open.c @@ -188,15 +188,10 @@ int xfer_open ( struct xfer_interface *xfer, int type, ... ) { * method handler. */ int xfer_vreopen ( struct xfer_interface *xfer, int type, va_list args ) { - struct xfer_interface_operations *op = xfer->op; /* Close existing connection */ - xfer_nullify ( xfer ); xfer_close ( xfer, 0 ); - /* Restore to operational status */ - xfer->op = op; - /* Open new location */ return xfer_vopen ( xfer, type, args ); } |
