laforge has submitted this change. (
https://gerrit.osmocom.org/c/osmo-e1d/+/26809 )
Change subject: usb: Add warning for error during interrupt transfers
......................................................................
usb: Add warning for error during interrupt transfers
Signed-off-by: Sylvain Munaut <tnt(a)246tNt.com>
Change-Id: Id4d2c95a2d934700f817e971aa4ce29e4bd85675
---
M src/usb.c
1 file changed, 5 insertions(+), 0 deletions(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, approved
diff --git a/src/usb.c b/src/usb.c
index 32a249a..c67f5b9 100644
--- a/src/usb.c
+++ b/src/usb.c
@@ -352,6 +352,11 @@
struct e1_line *line = (struct e1_line *) xfer->user_data;
const struct ice1usb_irq *irq = (const struct ice1usb_irq *) xfer->buffer;
+ if (xfer->status != LIBUSB_TRANSFER_COMPLETED) {
+ LOGPLI(line, DE1D, LOGL_ERROR, "Error in Interrupt transfer\n");
+ goto out;
+ }
+
if (!xfer->actual_length) {
LOGPLI(line, DE1D, LOGL_ERROR, "Zero-Length Interrupt transfer\n");
goto out;
--
To view, visit
https://gerrit.osmocom.org/c/osmo-e1d/+/26809
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-e1d
Gerrit-Branch: master
Gerrit-Change-Id: Id4d2c95a2d934700f817e971aa4ce29e4bd85675
Gerrit-Change-Number: 26809
Gerrit-PatchSet: 1
Gerrit-Owner: tnt <tnt(a)246tNt.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: merged