summaryrefslogtreecommitdiff
path: root/libusb/io.c
diff options
context:
space:
mode:
authorDaniel Drake <dan@reactivated.net>2009-11-21 17:01:32 +0000
committerDaniel Drake <dan@reactivated.net>2009-11-21 17:02:53 +0000
commit0232fc559cdacb9561f982dd6d28feb4435b3e4e (patch)
tree175030032ad57f271040b54ffd7f6f26922a7bfd /libusb/io.c
parent0bd7ef5d8697973a026c36c15d6276177b4ec4ea (diff)
downloadlibusb-0232fc559cdacb9561f982dd6d28feb4435b3e4e.tar.gz
Increase libusb_handle_events() timeout to 60 seconds
The internal timing seems to be working, this will be a better test of it before we make this timeout unlimited.
Diffstat (limited to 'libusb/io.c')
-rw-r--r--libusb/io.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/libusb/io.c b/libusb/io.c
index f6a7e23..387be4c 100644
--- a/libusb/io.c
+++ b/libusb/io.c
@@ -1958,11 +1958,10 @@ retry:
}
/** \ingroup poll
- * Handle any pending events in blocking mode with a sensible timeout. This
- * timeout is currently hardcoded at 2 seconds but we may change this if we
- * decide other values are more sensible. For finer control over whether this
- * function is blocking or non-blocking, or the maximum timeout, use
- * libusb_handle_events_timeout() instead.
+ * Handle any pending events in blocking mode. There is currently a timeout
+ * hardcoded at 60 seconds but we plan to make it unlimited in future. For
+ * finer control over whether this function is blocking or non-blocking, or
+ * for control over the timeout, use libusb_handle_events_timeout() instead.
*
* \param ctx the context to operate on, or NULL for the default context
* \returns 0 on success, or a LIBUSB_ERROR code on failure
@@ -1970,7 +1969,7 @@ retry:
API_EXPORTED int libusb_handle_events(libusb_context *ctx)
{
struct timeval tv;
- tv.tv_sec = 2;
+ tv.tv_sec = 60;
tv.tv_usec = 0;
return libusb_handle_events_timeout(ctx, &tv);
}