Core: Fix unconditional disarming of timerfd
authorPete Batard <pete@akeo.ie>
Tue, 10 Jul 2012 00:59:45 +0000 (01:59 +0100)
committerPete Batard <pete@akeo.ie>
Sat, 4 Aug 2012 16:18:18 +0000 (17:18 +0100)
commit3fadb8b4facf5106f1127e389e1855013c1701ca
tree0519410199bd1e9f1e7cda561f03d7cf4edc6c24
parentd2e8b37a68b06b8d75e9bd947b8a90d570a77778
Core: Fix unconditional disarming of timerfd

* Existing code appears disarms the timerfd always, which cancels
  pending timeouts as soon as one packet completes.
* This fix moves the disarming of the timerfd to
  arm_timerfd_for_next_timeout(), where it is now done conditionally.
  It also avoids calling disarm outside of the above call.
* This patch also ensures that all handling of the timerfd is done
  under the flying transfers lock.
* Issue reported by Hans de Goede. For more info, see:
  https://sourceforge.net/mailarchive/message.php?msg_id=29442693
libusb/io.c
libusb/version_nano.h