tnt has uploaded this change for review.

View Change

usb: Add warning for error during interrupt transfers

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Change-Id: Id4d2c95a2d934700f817e971aa4ce29e4bd85675
---
M src/usb.c
1 file changed, 5 insertions(+), 0 deletions(-)

git pull ssh://gerrit.osmocom.org:29418/osmo-e1d refs/changes/09/26809/1
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 change 26809. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: osmo-e1d
Gerrit-Branch: master
Gerrit-Change-Id: Id4d2c95a2d934700f817e971aa4ce29e4bd85675
Gerrit-Change-Number: 26809
Gerrit-PatchSet: 1
Gerrit-Owner: tnt <tnt@246tNt.com>
Gerrit-MessageType: newchange