summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikolai Kondrashov <spbnick@gmail.com>2010-07-30 09:06:41 +0000
committerNikolai Kondrashov <spbnick@gmail.com>2010-07-30 09:06:41 +0000
commitc31145a6a53aafdb6306a657701e9c0d9e38260f (patch)
tree54f36329fde79a45509e458753b74b4407f99106
parent59f27afd0b6e379c61923d8be2f3eaef52ddb352 (diff)
downloadusbhid-dump-c31145a6a53aafdb6306a657701e9c0d9e38260f.tar.gz
Added unsupported HID request response handling.
-rw-r--r--lib/iface.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/lib/iface.c b/lib/iface.c
index 3d378b5..1f1a7b0 100644
--- a/lib/iface.c
+++ b/lib/iface.c
@@ -324,7 +324,12 @@ hid_dump_iface_list_set_idle(const hid_dump_iface *list,
list->number,
NULL, 0,
timeout);
- if (rc < 0)
+ /*
+ * Ignoring EPIPE, which means a STALL handshake, which is OK on
+ * control pipes and indicates request is not supported.
+ * See USB 2.0 spec, 8.4.5 Handshake Packets
+ */
+ if (rc < 0 && rc != LIBUSB_ERROR_PIPE)
return rc;
}
@@ -354,7 +359,12 @@ hid_dump_iface_list_set_protocol(const hid_dump_iface *list,
list->number,
NULL, 0,
timeout);
- if (rc < 0)
+ /*
+ * Ignoring EPIPE, which means a STALL handshake, which is OK on
+ * control pipes and indicates request is not supported.
+ * See USB 2.0 spec, 8.4.5 Handshake Packets
+ */
+ if (rc < 0 && rc != LIBUSB_ERROR_PIPE)
return rc;
}