diff options
author | Takashi Sakamoto <o-takashi@sakamocchi.jp> | 2022-05-08 15:33:32 +0900 |
---|---|---|
committer | 坂本 貴史 <o-takashi@sakamocchi.jp> | 2022-05-08 15:36:32 +0900 |
commit | 6a3679f3608338060fb889fe29c3231c5a52888f (patch) | |
tree | 52db59343b8395e98459418c1be0526a1ee781f8 | |
parent | 8c135fee9a1e4f42f6c09a03e052c6995e85106d (diff) | |
download | libhinoko-6a3679f3608338060fb889fe29c3231c5a52888f.tar.gz |
fw_iso_rx_single: add comment about the size of context header for IR context
It's preferable for the size of context header in IR context to be greater
than 4.
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
-rw-r--r-- | src/fw_iso_rx_single.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/fw_iso_rx_single.c b/src/fw_iso_rx_single.c index 17d3b0f..d4f944a 100644 --- a/src/fw_iso_rx_single.c +++ b/src/fw_iso_rx_single.c @@ -240,7 +240,8 @@ HinokoFwIsoRxSingle *hinoko_fw_iso_rx_single_new(void) * @self: A [class@FwIsoRxSingle]. * @path: A path to any Linux FireWire character device. * @channel: An isochronous channel to listen, up to 63. - * @header_size: The number of bytes for header of IR context. + * @header_size: The number of bytes for header of IR context, greater than 4 at least to include + * isochronous header. * @error: A [struct@GLib.Error]. * * Allocate an IR context to 1394 OHCI controller for packet-per-buffer mode. A local node of the @@ -258,6 +259,7 @@ gboolean hinoko_fw_iso_rx_single_allocate(HinokoFwIsoRxSingle *self, const char g_return_val_if_fail(HINOKO_IS_FW_ISO_RX_SINGLE(self), FALSE); g_return_val_if_fail(channel <= IEEE1394_MAX_CHANNEL, FALSE); + g_return_val_if_fail(header_size >= 4, FALSE); g_return_val_if_fail(error == NULL || *error == NULL, FALSE); priv = hinoko_fw_iso_rx_single_get_instance_private(self); |