diff options
author | Takashi Sakamoto <o-takashi@sakamocchi.jp> | 2023-08-11 18:51:32 +0900 |
---|---|---|
committer | Takashi Sakamoto <o-takashi@sakamocchi.jp> | 2023-10-07 11:42:33 +0900 |
commit | bea38bcce8edd4d9960c7975b8bdbaf82e773ca0 (patch) | |
tree | 19295c1e8c9d67b7148e9a9456d28cd30cfb5a0c | |
parent | b4f7af298df4ce807549b513f94b85afd75c8164 (diff) | |
download | libhinawa-bea38bcce8edd4d9960c7975b8bdbaf82e773ca0.tar.gz |
fw_fcp: check card_id in requested event for transaction response
The value of node_id can differ according to bus generation, while the
value of card_id is stable. Both of them are available to filter out the
request subaction from unexpected node even if crossing bus reset.
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
-rw-r--r-- | src/fw_fcp.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/fw_fcp.c b/src/fw_fcp.c index 13940c3..c86c94a 100644 --- a/src/fw_fcp.c +++ b/src/fw_fcp.c @@ -519,11 +519,11 @@ static HinawaFwRcode handle_requested_signal(HinawaFwResp *resp, HinawaFwTcode t { HinawaFwFcp *self = HINAWA_FW_FCP(resp); HinawaFwFcpPrivate *priv = hinawa_fw_fcp_get_instance_private(self); - guint node_id; + guint local_card_id; - g_object_get(priv->node, "node-id", &node_id, NULL); + g_object_get(priv->node, "card-id", &local_card_id, NULL); if (offset == FCP_RESPOND_ADDR && tcode == HINAWA_FW_TCODE_WRITE_BLOCK_REQUEST && - src_node_id == node_id) + card_id == local_card_id) g_signal_emit(self, fw_fcp_sigs[FW_FCP_SIG_TYPE_RESPONDED], 0, tstamp, frame, length); // MEMO: Linux firewire subsystem already send response subaction to finish the transaction, |