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 f35138f..65b4763 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