This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
Kévin Redon gerrit-no-reply at lists.osmocom.orgKévin Redon has uploaded this change for review. ( https://gerrit.osmocom.org/9870
Change subject: host usb_util fix: used provided class, sub-class, and interfave when finding matching interfaces
......................................................................
host usb_util fix: used provided class, sub-class, and interfave when finding matching interfaces
Change-Id: Ibc06e751e6ca0f9e9a40d82c4eeddfb975240f91
---
M host/libusb_util.c
1 file changed, 4 insertions(+), 4 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/simtrace2 refs/changes/70/9870/1
diff --git a/host/libusb_util.c b/host/libusb_util.c
index 3236e41..5ee685e 100644
--- a/host/libusb_util.c
+++ b/host/libusb_util.c
@@ -130,11 +130,11 @@
for (k = 0; k < intf->num_altsetting; k++) {
const struct libusb_interface_descriptor *if_desc;
if_desc = &intf->altsetting[k];
- if (class > 0 && if_desc->bInterfaceClass != class)
+ if (class >= 0 && if_desc->bInterfaceClass != class)
continue;
- if (sub_class > 0 && if_desc->bInterfaceSubClass != sub_class)
+ if (sub_class >= 0 && if_desc->bInterfaceSubClass != sub_class)
continue;
- if (protocol > 0 && if_desc->bInterfaceProtocol != protocol)
+ if (protocol >= 0 && if_desc->bInterfaceProtocol != protocol)
continue;
/* MATCH! */
out[out_idx].usb_dev = dev;
@@ -197,7 +197,7 @@
dev_desc.idVendor, dev_desc.idProduct, addr);
#endif
- rc = dev_find_matching_interfaces(*dev, 255, 2, -1, out_cur, out_len_remain);
+ rc = dev_find_matching_interfaces(*dev, class, sub_class, protocol, out_cur, out_len_remain);
if (rc < 0)
continue;
out_cur += rc;
--
To view, visit https://gerrit.osmocom.org/9870
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: simtrace2
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibc06e751e6ca0f9e9a40d82c4eeddfb975240f91
Gerrit-Change-Number: 9870
Gerrit-PatchSet: 1
Gerrit-Owner: Kévin Redon <kredon at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20180704/a1669e2f/attachment.htm>