diff options
author | Michael Brown | 2008-01-22 19:53:01 +0100 |
---|---|---|
committer | Michael Brown | 2008-01-22 19:53:01 +0100 |
commit | 122abb50af8fa823778e185961f65122ff7b4270 (patch) | |
tree | 6129b8d1e4084f5c5f89093031853eebb477e69d /src/net/udp/tftp.c | |
parent | Add preliminary support for MTFTP. (diff) | |
parent | Make seek information part of the xfer metadata, rather than an entirely (diff) | |
download | ipxe-122abb50af8fa823778e185961f65122ff7b4270.tar.gz ipxe-122abb50af8fa823778e185961f65122ff7b4270.tar.xz ipxe-122abb50af8fa823778e185961f65122ff7b4270.zip |
Merge branch 'master' of rom.etherboot.org:/pub/scm/gpxe
Diffstat (limited to 'src/net/udp/tftp.c')
-rw-r--r-- | src/net/udp/tftp.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/net/udp/tftp.c b/src/net/udp/tftp.c index d5f02a08..e9698004 100644 --- a/src/net/udp/tftp.c +++ b/src/net/udp/tftp.c @@ -703,6 +703,7 @@ static int tftp_rx_oack ( struct tftp_request *tftp, void *buf, size_t len ) { static int tftp_rx_data ( struct tftp_request *tftp, struct io_buffer *iobuf ) { struct tftp_data *data = iobuf->data; + struct xfer_metadata meta; int block; off_t offset; size_t data_len; @@ -729,8 +730,10 @@ static int tftp_rx_data ( struct tftp_request *tftp, } /* Deliver data */ - xfer_seek ( &tftp->xfer, offset, SEEK_SET ); - rc = xfer_deliver_iob ( &tftp->xfer, iobuf ); + memset ( &meta, 0, sizeof ( meta ) ); + meta.whence = SEEK_SET; + meta.offset = offset; + rc = xfer_deliver_iob_meta ( &tftp->xfer, iobuf, &meta ); iobuf = NULL; if ( rc != 0 ) { DBGC ( tftp, "TFTP %p could not deliver data: %s\n", @@ -909,7 +912,6 @@ static int tftp_socket_deliver_iob ( struct xfer_interface *socket, static struct xfer_interface_operations tftp_socket_operations = { .close = ignore_xfer_close, .vredirect = xfer_vopen, - .seek = ignore_xfer_seek, .window = unlimited_xfer_window, .alloc_iob = default_xfer_alloc_iob, .deliver_iob = tftp_socket_deliver_iob, @@ -937,7 +939,6 @@ static int tftp_mc_socket_deliver_iob ( struct xfer_interface *mc_socket, static struct xfer_interface_operations tftp_mc_socket_operations = { .close = ignore_xfer_close, .vredirect = xfer_vopen, - .seek = ignore_xfer_seek, .window = unlimited_xfer_window, .alloc_iob = default_xfer_alloc_iob, .deliver_iob = tftp_mc_socket_deliver_iob, @@ -964,7 +965,6 @@ static void tftp_xfer_close ( struct xfer_interface *xfer, int rc ) { static struct xfer_interface_operations tftp_xfer_operations = { .close = tftp_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, |