]> git.zerfleddert.de Git - hmcfgusb/commitdiff
use minimum tiemout value from call/libusb
authorMichael Gernoth <michael@gernoth.net>
Mon, 8 Jul 2013 11:03:38 +0000 (13:03 +0200)
committerMichael Gernoth <michael@gernoth.net>
Mon, 8 Jul 2013 11:03:38 +0000 (13:03 +0200)
hmcfgusb.c

index f35138f6d7bbe22cddb13bf1b55074de818fc161..65b47637a5193bf89a70deffb671236ff6fdea85 100644 (file)
@@ -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;
                }
        }
 
Impressum, Datenschutz