From e7c80e748ed3b00c432f3c00f2ec7b7262527db3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Mon, 8 Jun 2026 13:27:36 +0200 Subject: [PATCH] fpi-usb-transfer: Add missing definition of set_short_error() It was in the header but not implemented --- libfprint/fpi-usb-transfer.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/libfprint/fpi-usb-transfer.c b/libfprint/fpi-usb-transfer.c index ac4f60ca..067ae186 100644 --- a/libfprint/fpi-usb-transfer.c +++ b/libfprint/fpi-usb-transfer.c @@ -548,3 +548,23 @@ fpi_usb_transfer_submit_sync (FpiUsbTransfer *transfer, return res; } + +/** + * fpi_usb_transfer_set_short_error: + * @transfer: The transfer to submit, must have been filled. + * @short_is_error: Whether a short transfer should be considered an error + * + * Sets whether a short transfer (a transfer in which the transferred length + * does not match the expected length) should be considered an error + * + * By default, short transfers are not considered an error, but + * drivers can enforce a further check by setting this flag. + */ +void +fpi_usb_transfer_set_short_error (FpiUsbTransfer *transfer, + gboolean short_is_error) +{ + g_return_if_fail (transfer); + + transfer->short_is_error = short_is_error; +}