FTDI FT: Indicate number of bytes sent on wire

Change-Id: Icc4457c23774810dc9849b9c379a3e68ca164f14
Reviewed-on: https://code.wireshark.org/review/33555
Petri-Dish: Pascal Quantin <pascal@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal@wireshark.org>
This commit is contained in:
Tomasz Moń 2019-06-11 17:20:09 +02:00 committed by Pascal Quantin
parent f155601d66
commit d55b9b0d2b
1 changed files with 3 additions and 3 deletions

View File

@ -663,7 +663,7 @@ dissect_ftdi_ft(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
}
else
{
if (tvb_captured_length_remaining(tvb, offset) > 0)
if (tvb_reported_length_remaining(tvb, offset) > 0)
{
/* TODO: Dissect control data phase (GetModemStat, GetLatTimer) */
proto_tree_add_expert(main_tree, pinfo, &ei_undecoded, tvb, offset, -1);
@ -717,11 +717,11 @@ dissect_ftdi_ft(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
col_add_fstr(pinfo->cinfo, COL_INFO, "INTERFACE %s TX", interface_str);
payload_hf = tx_hf;
}
bytes = tvb_captured_length_remaining(tvb, offset);
bytes = tvb_reported_length_remaining(tvb, offset);
if (bytes > 0)
{
col_append_fstr(pinfo->cinfo, COL_INFO, " %d bytes", bytes);
proto_tree_add_item(main_tree, payload_hf, tvb, offset, -1, ENC_NA);
proto_tree_add_item(main_tree, payload_hf, tvb, offset, bytes, ENC_NA);
offset += bytes;
}
}