aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-usb.c
diff options
context:
space:
mode:
Diffstat (limited to 'epan/dissectors/packet-usb.c')
-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 8fbf3f4b6b..13f1678916 100644
--- a/epan/dissectors/packet-usb.c
+++ b/epan/dissectors/packet-usb.c
@@ -2725,10 +2725,8 @@ dissect_usb_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent,
dissect_linux_usb_pseudo_header(tvb, pinfo, tree, &bus_id, &device_address);
urb_type = tvb_get_guint8(tvb, 8);
- is_request = (urb_type == URB_SUBMIT) ? TRUE : FALSE;
type = tvb_get_guint8(tvb, 9);
endpoint_with_dir = tvb_get_guint8(tvb, 10);
- endpoint = endpoint_with_dir & (~URB_TRANSFER_IN);
setup_flag = tvb_get_guint8(tvb, 14);
offset += 40; /* skip first part of the pseudo-header */
} else if (header_info & USB_HEADER_IS_USBPCAP) {
@@ -2749,10 +2747,8 @@ dissect_usb_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent,
} else {
urb_type = URB_SUBMIT;
}
- is_request = (urb_type == URB_SUBMIT) ? TRUE : FALSE;
type = tvb_get_guint8(tvb, 22);
endpoint_with_dir = tvb_get_guint8(tvb, 21);
- endpoint = endpoint_with_dir & (~URB_TRANSFER_IN);
win32_data_len = tvb_get_letohl(tvb, 23);
usbpcap_control_stage = tvb_get_guint8(tvb, 27);
@@ -2772,6 +2768,9 @@ dissect_usb_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent,
return;
}
+ endpoint = endpoint_with_dir & (~URB_TRANSFER_IN);
+ is_request = (urb_type == URB_SUBMIT) ? TRUE : FALSE;
+
/* Set up addresses and ports. */
if (is_request) {
src_addr.device = 0xffffffff;