diff options
author | Takashi Sakamoto <o-takashi@sakamocchi.jp> | 2022-11-29 14:08:57 +0900 |
---|---|---|
committer | Takashi Sakamoto <o-takashi@sakamocchi.jp> | 2022-12-01 16:59:00 +0900 |
commit | 905869b214417fb20d1602031c9bb2dab7ab6574 (patch) | |
tree | b7493d259e2d8b49afd5f7824a3647b6326f7f89 | |
parent | 0e9269af55ff3866f0fc9ed98cb8d9868cd7163b (diff) | |
download | libhinoko-905869b214417fb20d1602031c9bb2dab7ab6574.tar.gz |
fw_iso_rx_multiple: fix failure to call ioctl(2) with FW_CDEV_IOC_FLUSH_ISO
The ioctl request requires argument of struct fw_cdev_flush_iso, while
current implementation call it without any arguments.
This commit fixes the bug.
Fixes: e6d517c08d2f ("fw_iso_ctx: add API to flush isochronous context")
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
-rw-r--r-- | src/fw_iso_ctx_private.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/fw_iso_ctx_private.c b/src/fw_iso_ctx_private.c index 2cc34b5..2c27d28 100644 --- a/src/fw_iso_ctx_private.c +++ b/src/fw_iso_ctx_private.c @@ -593,7 +593,11 @@ void fw_iso_ctx_state_read_frame(struct fw_iso_ctx_state *state, guint offset, g */ gboolean fw_iso_ctx_state_flush_completions(struct fw_iso_ctx_state *state, GError **error) { - if (ioctl(state->fd, FW_CDEV_IOC_FLUSH_ISO) < 0) { + struct fw_cdev_flush_iso arg = { + .handle = state->handle, + }; + + if (ioctl(state->fd, FW_CDEV_IOC_FLUSH_ISO, &arg) < 0) { generate_fw_iso_ctx_error_ioctl(error, errno, FW_CDEV_IOC_FLUSH_ISO); return FALSE; } |