Subject: | Wrapper doesn't get bInterfaceClass correctly |
Hello,
First of all, thanks for this wrapper.
Wrapper doesn't get bInterfaceClass correctly, since it assigns it to
bInterfaceNumber. This makes impossible to search devices by their
interface class. I can reproduce this problem under version 0.13
I attach a patch that solves the problem.
Regards,
Josep Monés Teixidor
Subject: | binterfaceclass_is_not_binterfacenumber.diff |
diff -Naur Device-USB-0.13.old/lib/Device/USB.pm Device-USB-0.13/lib/Device/USB.pm
--- Device-USB-0.13.old/lib/Device/USB.pm 2006-05-19 04:20:14.000000000 +0200
+++ Device-USB-0.13/lib/Device/USB.pm 2006-07-10 18:20:31.000000000 +0200
@@ -622,7 +622,7 @@
hashStoreInt( hash, "bInterfaceNumber", inter->bInterfaceNumber );
hashStoreInt( hash, "bAlternateSetting", inter->bAlternateSetting );
hashStoreInt( hash, "bNumEndpoints ", inter->bNumEndpoints );
- hashStoreInt( hash, "bInterfaceNumber", inter->bInterfaceClass );
+ hashStoreInt( hash, "bInterfaceClass", inter->bInterfaceClass );
hashStoreInt( hash, "bInterfaceSubClass", inter->bInterfaceSubClass );
hashStoreInt( hash, "bInterfaceProtocol", inter->bInterfaceProtocol );
hashStoreInt( hash, "iInterface", inter->iInterface );
diff -Naur Device-USB-0.13.old/USB.pm Device-USB-0.13/USB.pm
--- Device-USB-0.13.old/USB.pm 2006-05-19 04:20:14.000000000 +0200
+++ Device-USB-0.13/USB.pm 2006-07-10 18:20:50.000000000 +0200
@@ -622,7 +622,7 @@
hashStoreInt( hash, "bInterfaceNumber", inter->bInterfaceNumber );
hashStoreInt( hash, "bAlternateSetting", inter->bAlternateSetting );
hashStoreInt( hash, "bNumEndpoints ", inter->bNumEndpoints );
- hashStoreInt( hash, "bInterfaceNumber", inter->bInterfaceClass );
+ hashStoreInt( hash, "bInterfaceClass", inter->bInterfaceClass );
hashStoreInt( hash, "bInterfaceSubClass", inter->bInterfaceSubClass );
hashStoreInt( hash, "bInterfaceProtocol", inter->bInterfaceProtocol );
hashStoreInt( hash, "iInterface", inter->iInterface );