|
@@ -378,37 +378,15 @@ static void ftp_data_closed ( struct ftp_request *ftp, int rc ) {
|
378
|
378
|
}
|
379
|
379
|
}
|
380
|
380
|
|
381
|
|
-/**
|
382
|
|
- * Handle data delivery via FTP data channel
|
383
|
|
- *
|
384
|
|
- * @v ftp FTP request
|
385
|
|
- * @v iobuf I/O buffer
|
386
|
|
- * @v meta Data transfer metadata
|
387
|
|
- * @ret rc Return status code
|
388
|
|
- */
|
389
|
|
-static int ftp_data_deliver ( struct ftp_request *ftp,
|
390
|
|
- struct io_buffer *iobuf,
|
391
|
|
- struct xfer_metadata *meta __unused ) {
|
392
|
|
- int rc;
|
393
|
|
-
|
394
|
|
- if ( ( rc = xfer_deliver_iob ( &ftp->xfer, iobuf ) ) != 0 ) {
|
395
|
|
- DBGC ( ftp, "FTP %p failed to deliver data: %s\n",
|
396
|
|
- ftp, strerror ( rc ) );
|
397
|
|
- return rc;
|
398
|
|
- }
|
399
|
|
-
|
400
|
|
- return 0;
|
401
|
|
-}
|
402
|
|
-
|
403
|
381
|
/** FTP data channel interface operations */
|
404
|
382
|
static struct interface_operation ftp_data_operations[] = {
|
405
|
|
- INTF_OP ( xfer_deliver, struct ftp_request *, ftp_data_deliver ),
|
406
|
383
|
INTF_OP ( intf_close, struct ftp_request *, ftp_data_closed ),
|
407
|
384
|
};
|
408
|
385
|
|
409
|
386
|
/** FTP data channel interface descriptor */
|
410
|
387
|
static struct interface_descriptor ftp_data_desc =
|
411
|
|
- INTF_DESC ( struct ftp_request, data, ftp_data_operations );
|
|
388
|
+ INTF_DESC_PASSTHRU ( struct ftp_request, data, ftp_data_operations,
|
|
389
|
+ xfer );
|
412
|
390
|
|
413
|
391
|
/*****************************************************************************
|
414
|
392
|
*
|
|
@@ -423,7 +401,8 @@ static struct interface_operation ftp_xfer_operations[] = {
|
423
|
401
|
|
424
|
402
|
/** FTP data transfer interface descriptor */
|
425
|
403
|
static struct interface_descriptor ftp_xfer_desc =
|
426
|
|
- INTF_DESC ( struct ftp_request, xfer, ftp_xfer_operations );
|
|
404
|
+ INTF_DESC_PASSTHRU ( struct ftp_request, xfer, ftp_xfer_operations,
|
|
405
|
+ data );
|
427
|
406
|
|
428
|
407
|
/*****************************************************************************
|
429
|
408
|
*
|