summaryrefslogtreecommitdiffstats
path: root/src/net
diff options
context:
space:
mode:
authorMichael Brown2016-11-16 23:22:13 +0100
committerMichael Brown2016-11-16 23:22:13 +0100
commitdaa8ed9274d91a157dc049f00792f62c98b0a11a (patch)
tree7ce6edec2f46a6fcab3c0a1edc9c989e2b6c3885 /src/net
parent[build] Disable TIVOLI_VMM_WORKAROUND in the qemu configuration (diff)
downloadipxe-daa8ed9274d91a157dc049f00792f62c98b0a11a.tar.gz
ipxe-daa8ed9274d91a157dc049f00792f62c98b0a11a.tar.xz
ipxe-daa8ed9274d91a157dc049f00792f62c98b0a11a.zip
[interface] Provide intf_reinit() to reinitialise nullified interfaces
Provide an abstraction intf_reinit() to restore the descriptor of a previously nullified interface. Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/net')
-rw-r--r--src/net/tcp/httpcore.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/net/tcp/httpcore.c b/src/net/tcp/httpcore.c
index b1f74bc4..27cc5065 100644
--- a/src/net/tcp/httpcore.c
+++ b/src/net/tcp/httpcore.c
@@ -787,12 +787,9 @@ static int http_transfer_complete ( struct http_transaction *http ) {
/* Restart content decoding interfaces (which may be attached
* to the same object).
*/
- intf_nullify ( &http->content );
- intf_nullify ( &http->transfer );
+ intf_nullify ( &http->transfer ); /* avoid potential loops */
intf_restart ( &http->content, http->response.rc );
intf_restart ( &http->transfer, http->response.rc );
- http->content.desc = &http_content_desc;
- http->transfer.desc = &http_transfer_desc;
intf_plug_plug ( &http->transfer, &http->content );
http->len = 0;
assert ( http->remaining == 0 );