aboutsummaryrefslogtreecommitdiffstats
path: root/epan
diff options
context:
space:
mode:
authorMartin Kaiser <wireshark@kaiser.cx>2014-06-10 16:21:39 +0200
committerMartin Kaiser <wireshark@kaiser.cx>2014-06-14 14:05:23 +0000
commit2c9b7c54a353e36a4beee2bf20ab3f08ed882a9e (patch)
treea775ed026bcd2d76d969f6fe9a4906289c717133 /epan
parent09784a977c9540675a5a1f6e9fc58ce0b053a3ac (diff)
downloadwireshark-2c9b7c54a353e36a4beee2bf20ab3f08ed882a9e.tar.gz
wireshark-2c9b7c54a353e36a4beee2bf20ab3f08ed882a9e.tar.bz2
wireshark-2c9b7c54a353e36a4beee2bf20ab3f08ed882a9e.zip
simplify the detection of iso data start offset
Change-Id: Idcae64accda9d812fdeb21b71bed35601cfbcd89 Reviewed-on: https://code.wireshark.org/review/2211 Reviewed-by: Martin Kaiser <wireshark@kaiser.cx> Tested-by: Martin Kaiser <wireshark@kaiser.cx>
Diffstat (limited to 'epan')
-rw-r--r--epan/dissectors/packet-usb.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/epan/dissectors/packet-usb.c b/epan/dissectors/packet-usb.c
index ae3bfe0617..7359f2d24b 100644
--- a/epan/dissectors/packet-usb.c
+++ b/epan/dissectors/packet-usb.c
@@ -2913,7 +2913,6 @@ dissect_usb_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent,
int endpoint;
gint type_2 = 0;
guint8 urb_type;
- guint16 hdr_len = 0;
guint32 win32_data_len = 0;
proto_item *tree_ti;
proto_tree *tree;
@@ -2969,7 +2968,6 @@ dissect_usb_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent,
if there's a transfer-specific pseudo-header following */
proto_item_set_len(tree_ti, offset);
- hdr_len = tvb_get_letohs(tvb, 0);
win32_data_len = tvb_get_letohl(tvb, 23);
}
@@ -3245,8 +3243,6 @@ dissect_usb_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent,
guint32 data_start_offset;
proto_tree *urb_tree;
- /* 27 bytes of header were dissected in dissect_win32_usb_pseudo_header() */
- data_start_offset = offset - 27 + hdr_len;
urb_tree = parent;
proto_tree_add_item(tree, hf_usb_win32_iso_start_frame, tvb, offset, 4, ENC_LITTLE_ENDIAN);
@@ -3259,6 +3255,9 @@ dissect_usb_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent,
proto_tree_add_item(tree, hf_usb_win32_iso_error_count, tvb, offset, 4, ENC_LITTLE_ENDIAN);
offset += 4;
+ data_start_offset = offset + 12 * num_packets;
+ proto_item_set_len(tree_ti, data_start_offset);
+
for (i = 0; i < num_packets; i++)
{
guint32 this_offset;