diff options
| author | Michael Brown | 2007-07-08 15:11:07 +0200 |
|---|---|---|
| committer | Michael Brown | 2007-07-08 15:11:07 +0200 |
| commit | b34d4d044978714abe771ca8d7d07153ad048d82 (patch) | |
| tree | 017d6c4e37f0bc49df6ae461074a41691e08013f /src/net/tcp | |
| parent | Kill off unused request() method in data-xfer interface. (diff) | |
| download | ipxe-b34d4d044978714abe771ca8d7d07153ad048d82.tar.gz ipxe-b34d4d044978714abe771ca8d7d07153ad048d82.tar.xz ipxe-b34d4d044978714abe771ca8d7d07153ad048d82.zip | |
Separate the "is data ready" function of xfer_seek() into an
xfer_window() function, which can return a scalar rather than a
boolean.
Diffstat (limited to 'src/net/tcp')
| -rw-r--r-- | src/net/tcp/ftp.c | 3 | ||||
| -rw-r--r-- | src/net/tcp/http.c | 4 |
2 files changed, 6 insertions, 1 deletions
diff --git a/src/net/tcp/ftp.c b/src/net/tcp/ftp.c index 6c09edff1..646638aba 100644 --- a/src/net/tcp/ftp.c +++ b/src/net/tcp/ftp.c @@ -297,6 +297,7 @@ static struct xfer_interface_operations ftp_control_operations = { .close = ftp_control_close, .vredirect = xfer_vopen, .seek = ignore_xfer_seek, + .window = unlimited_xfer_window, .alloc_iob = default_xfer_alloc_iob, .deliver_iob = xfer_deliver_as_raw, .deliver_raw = ftp_control_deliver_raw, @@ -361,6 +362,7 @@ static struct xfer_interface_operations ftp_data_operations = { .close = ftp_data_closed, .vredirect = xfer_vopen, .seek = ignore_xfer_seek, + .window = unlimited_xfer_window, .alloc_iob = default_xfer_alloc_iob, .deliver_iob = ftp_data_deliver_iob, .deliver_raw = xfer_deliver_as_iob, @@ -393,6 +395,7 @@ static struct xfer_interface_operations ftp_xfer_operations = { .close = ftp_xfer_closed, .vredirect = ignore_xfer_vredirect, .seek = ignore_xfer_seek, + .window = unlimited_xfer_window, .alloc_iob = default_xfer_alloc_iob, .deliver_iob = xfer_deliver_as_raw, .deliver_raw = ignore_xfer_deliver_raw, diff --git a/src/net/tcp/http.c b/src/net/tcp/http.c index 287a56a06..0c0164139 100644 --- a/src/net/tcp/http.c +++ b/src/net/tcp/http.c @@ -388,7 +388,7 @@ static void http_step ( struct process *process ) { const char *query = http->uri->query; int rc; - if ( xfer_ready ( &http->socket ) == 0 ) { + if ( xfer_window ( &http->socket ) ) { process_del ( &http->process ); if ( ( rc = xfer_printf ( &http->socket, "GET %s%s%s HTTP/1.1\r\n" @@ -425,6 +425,7 @@ static struct xfer_interface_operations http_socket_operations = { .close = http_socket_close, .vredirect = xfer_vopen, .seek = ignore_xfer_seek, + .window = unlimited_xfer_window, .alloc_iob = default_xfer_alloc_iob, .deliver_iob = http_socket_deliver_iob, .deliver_raw = xfer_deliver_as_iob, @@ -451,6 +452,7 @@ static struct xfer_interface_operations http_xfer_operations = { .close = http_xfer_close, .vredirect = ignore_xfer_vredirect, .seek = ignore_xfer_seek, + .window = unlimited_xfer_window, .alloc_iob = default_xfer_alloc_iob, .deliver_iob = xfer_deliver_as_raw, .deliver_raw = ignore_xfer_deliver_raw, |
