summaryrefslogtreecommitdiff
path: root/libusb/io.c
diff options
context:
space:
mode:
authorDaniel Drake <dsd@gentoo.org>2009-01-17 00:25:40 +0000
committerDaniel Drake <dsd@gentoo.org>2009-01-17 00:29:36 +0000
commitc754ae294cfe96ec4738d6641137c9e6c56330c7 (patch)
treee98ee8ef5342b334611812009185b4db73ce43d1 /libusb/io.c
parentb9ca960f2ba271d2b1a58e22b7c70464d69f6c8a (diff)
downloadlibusb-c754ae294cfe96ec4738d6641137c9e6c56330c7.tar.gz
Decrement poll() result when internal pipe has been handled
When we receive data on the internal control pipe, we need to correctly decrement the number of ready file descriptors before passing on the remaining work to the OS implementation.
Diffstat (limited to 'libusb/io.c')
-rw-r--r--libusb/io.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libusb/io.c b/libusb/io.c
index 320bc4b..b053f85 100644
--- a/libusb/io.c
+++ b/libusb/io.c
@@ -1587,6 +1587,7 @@ static int handle_events(struct libusb_context *ctx, struct timeval *tv)
} else {
/* prevent OS backend from trying to handle events on ctrl pipe */
fds[0].revents = 0;
+ r--;
}
}