diff options
| author | Michael Brown | 2011-06-24 13:51:45 +0200 |
|---|---|---|
| committer | Michael Brown | 2011-06-28 14:39:14 +0200 |
| commit | 5763472b34724d5f320da7ecd90ed32f14c0855b (patch) | |
| tree | 3380ae4e4c5c90ecbc2b8b286583ef2b585adc2d /src | |
| parent | [prefix] Cope with BOOT_IMAGE= anywhere within command line (diff) | |
| download | ipxe-5763472b34724d5f320da7ecd90ed32f14c0855b.tar.gz ipxe-5763472b34724d5f320da7ecd90ed32f14c0855b.tar.xz ipxe-5763472b34724d5f320da7ecd90ed32f14c0855b.zip | |
[ftp] Remove redundant ftp_data_deliver() method
ftp_data_deliver() does nothing except pass through the received data
to the xfer interface, and so can be eliminated by using a
pass-through interface.
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src')
| -rw-r--r-- | src/net/tcp/ftp.c | 29 |
1 files changed, 4 insertions, 25 deletions
diff --git a/src/net/tcp/ftp.c b/src/net/tcp/ftp.c index 957f05cc8..e5bc8e9f3 100644 --- a/src/net/tcp/ftp.c +++ b/src/net/tcp/ftp.c @@ -378,37 +378,15 @@ static void ftp_data_closed ( struct ftp_request *ftp, int rc ) { } } -/** - * Handle data delivery via FTP data channel - * - * @v ftp FTP request - * @v iobuf I/O buffer - * @v meta Data transfer metadata - * @ret rc Return status code - */ -static int ftp_data_deliver ( struct ftp_request *ftp, - struct io_buffer *iobuf, - struct xfer_metadata *meta __unused ) { - int rc; - - if ( ( rc = xfer_deliver_iob ( &ftp->xfer, iobuf ) ) != 0 ) { - DBGC ( ftp, "FTP %p failed to deliver data: %s\n", - ftp, strerror ( rc ) ); - return rc; - } - - return 0; -} - /** FTP data channel interface operations */ static struct interface_operation ftp_data_operations[] = { - INTF_OP ( xfer_deliver, struct ftp_request *, ftp_data_deliver ), INTF_OP ( intf_close, struct ftp_request *, ftp_data_closed ), }; /** FTP data channel interface descriptor */ static struct interface_descriptor ftp_data_desc = - INTF_DESC ( struct ftp_request, data, ftp_data_operations ); + INTF_DESC_PASSTHRU ( struct ftp_request, data, ftp_data_operations, + xfer ); /***************************************************************************** * @@ -423,7 +401,8 @@ static struct interface_operation ftp_xfer_operations[] = { /** FTP data transfer interface descriptor */ static struct interface_descriptor ftp_xfer_desc = - INTF_DESC ( struct ftp_request, xfer, ftp_xfer_operations ); + INTF_DESC_PASSTHRU ( struct ftp_request, xfer, ftp_xfer_operations, + data ); /***************************************************************************** * |
