diff options
author | Pete Batard <pbatard@gmail.com> | 2010-03-10 20:39:07 +0000 |
---|---|---|
committer | Pete Batard <pbatard@gmail.com> | 2010-03-10 20:39:07 +0000 |
commit | b35a7e03dcf9ea087b267099d8d8edd4b77ee124 (patch) | |
tree | 5c45a57d05052f78bb02daa343383f03db5b8ec4 /libusb/os/windows_usb.c | |
parent | f4b7fdd52794eb94bda5117d89dc07e2c5dce2ab (diff) | |
download | libusb-b35a7e03dcf9ea087b267099d8d8edd4b77ee124.tar.gz |
moved usbi_fd_notification call after usbi_add_pollfdr203
Diffstat (limited to 'libusb/os/windows_usb.c')
-rw-r--r-- | libusb/os/windows_usb.c | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/libusb/os/windows_usb.c b/libusb/os/windows_usb.c index 5b0ae89..dd4dac0 100644 --- a/libusb/os/windows_usb.c +++ b/libusb/os/windows_usb.c @@ -58,6 +58,8 @@ #define LOOP_CHECK(fcall) { r=fcall; if (r != LIBUSB_SUCCESS) continue; } #define LOOP_BREAK(err) { r=err; continue; } +extern void usbi_fd_notification(struct libusb_context *ctx); + // Helper prototypes static int windows_get_active_config_descriptor(struct libusb_device *dev, unsigned char *buffer, size_t len, int *host_endian); static int windows_clock_gettime(int clk_id, struct timespec *tp); @@ -1737,6 +1739,9 @@ static int submit_bulk_transfer(struct usbi_transfer *itransfer) usbi_add_pollfd(ctx, transfer_priv->pollable_fd.fd, (short)((transfer->endpoint & LIBUSB_ENDPOINT_IN)?POLLIN:POLLOUT)); +#if !defined(DYNAMIC_FDS) + usbi_fd_notification(ctx); +#endif return LIBUSB_SUCCESS; } @@ -1756,6 +1761,9 @@ static int submit_iso_transfer(struct usbi_transfer *itransfer) usbi_add_pollfd(ctx, transfer_priv->pollable_fd.fd, (short)((transfer->endpoint & LIBUSB_ENDPOINT_IN)?POLLIN:POLLOUT)); +#if !defined(DYNAMIC_FDS) + usbi_fd_notification(ctx); +#endif return LIBUSB_SUCCESS; } @@ -1774,6 +1782,9 @@ static int submit_control_transfer(struct usbi_transfer *itransfer) } usbi_add_pollfd(ctx, transfer_priv->pollable_fd.fd, POLLIN); +#if !defined(DYNAMIC_FDS) + usbi_fd_notification(ctx); +#endif return LIBUSB_SUCCESS; @@ -2543,7 +2554,7 @@ static int winusb_submit_control_transfer(struct usbi_transfer *itransfer) usbi_dbg("will use interface %d", current_interface); winusb_handle = handle_priv->interface_handle[current_interface].api_handle; - wfd = usbi_create_fd(winusb_handle, _O_RDONLY, ctx); + wfd = usbi_create_fd(winusb_handle, _O_RDONLY); if (wfd.fd < 0) { return LIBUSB_ERROR_NO_MEM; } @@ -2619,7 +2630,7 @@ static int winusb_submit_bulk_transfer(struct usbi_transfer *itransfer) winusb_handle = handle_priv->interface_handle[current_interface].api_handle; direction_in = transfer->endpoint & LIBUSB_ENDPOINT_IN; - wfd = usbi_create_fd(winusb_handle, direction_in?_O_RDONLY:_O_WRONLY, ctx); + wfd = usbi_create_fd(winusb_handle, direction_in?_O_RDONLY:_O_WRONLY); if (wfd.fd < 0) { return LIBUSB_ERROR_NO_MEM; } @@ -3583,7 +3594,7 @@ static int hid_submit_control_transfer(struct usbi_transfer *itransfer) usbi_dbg("will use interface %d", current_interface); hid_handle = handle_priv->interface_handle[current_interface].api_handle; - wfd = usbi_create_fd(hid_handle, _O_RDONLY, ctx); + wfd = usbi_create_fd(hid_handle, _O_RDONLY); if (wfd.fd < 0) { return LIBUSB_ERROR_NO_MEM; } @@ -3685,7 +3696,7 @@ static int hid_submit_bulk_transfer(struct usbi_transfer *itransfer) { hid_handle = handle_priv->interface_handle[current_interface].api_handle; direction_in = transfer->endpoint & LIBUSB_ENDPOINT_IN; - wfd = usbi_create_fd(hid_handle, direction_in?_O_RDONLY:_O_WRONLY, ctx); + wfd = usbi_create_fd(hid_handle, direction_in?_O_RDONLY:_O_WRONLY); if (wfd.fd < 0) { return LIBUSB_ERROR_NO_MEM; } |