From: Michael Gernoth Date: Mon, 8 Jul 2013 11:03:38 +0000 (+0200) Subject: use minimum tiemout value from call/libusb X-Git-Tag: v0.100~70 X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/hmcfgusb/commitdiff_plain/ec30827c59527dfe961b0617f509c78f6ac39ce4 use minimum tiemout value from call/libusb --- diff --git a/hmcfgusb.c b/hmcfgusb.c index f35138f..65b4763 100644 --- a/hmcfgusb.c +++ b/hmcfgusb.c @@ -407,6 +407,9 @@ int hmcfgusb_poll(struct hmcfgusb_dev *dev, int timeout) } else { if ((tv.tv_sec == 0) && (tv.tv_usec == 0)) { usb_event = 1; + } else if (tv.tv_sec > timeout) { + tv.tv_sec = timeout; + tv.tv_usec = 0; } }