sebastiank wrote:
> libusbx: warning [add_to_flying_list] failed to arm first timerfd (errno 22,
> it_value = 259823:1000000000)
Here's a patch to fix that bug, but I'm not sure if it is enough to
completely solve the problem.
//Peter
>From 3b821d0a709c6b5b3094a763bb04e48ed0447050 Mon Sep 17 00:00:00 2001
From: Peter Stuge <pe...@stuge.se>
Date: Wed, 22 Aug 2012 01:32:10 -0700
Subject: [PATCH] io.c: Handle >= 1 second transfer timeout in
libusb_submit_transfer()
---
libusb/io.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/libusb/io.c b/libusb/io.c
index 16933fd..d858bb7 100644
--- a/libusb/io.c
+++ b/libusb/io.c
@@ -1141,7 +1141,7 @@ static int calculate_timeout(struct usbi_transfer
*transfer)
current_time.tv_sec += timeout / 1000;
current_time.tv_nsec += (timeout % 1000) * 1000000;
- if (current_time.tv_nsec > 1000000000) {
+ while (current_time.tv_nsec >= 1000000000) {
current_time.tv_nsec -= 1000000000;
current_time.tv_sec++;
}
--
1.7.4.1.343.ga91df.dirty
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
libusbx-devel mailing list
libusbx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libusbx-devel