summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikolai Kondrashov <spbnick@gmail.com>2010-07-22 20:12:01 +0000
committerNikolai Kondrashov <spbnick@gmail.com>2010-07-22 20:12:01 +0000
commiteff49adf928966427770bd37aaad13bb5404886b (patch)
tree6a4ee0454dea0adefd523a1737f905cca2d7a8bb
parent78298d17820e95771b54529a4c29b94c292c00da (diff)
downloadusbhid-dump-eff49adf928966427770bd37aaad13bb5404886b.tar.gz
Added transfer error termination message.
-rw-r--r--src/hid-dump.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/hid-dump.c b/src/hid-dump.c
index 4625cbd..22d220b 100644
--- a/src/hid-dump.c
+++ b/src/hid-dump.c
@@ -349,8 +349,11 @@ dump_iface_list_stream(libusb_context *ctx, hid_dump_iface *list)
}
}
- /* Success only if there were no terminated transfers */
- result = transfer_num == 0 || submitted;
+ /* If all the transfers were terminated unexpectedly */
+ if (transfer_num > 0 && !submitted)
+ ERROR_CLEANUP("No more interfaces to dump");
+
+ result = true;
cleanup: