FreeBSD Bugzilla – Attachment 225640 Details for
Bug 256296
"No Device" error after using asynchronous API of libusb once
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
libusb patch that fixes the race
libusb-fix-no-device-error.patch (text/plain), 657 bytes, created by
Sergii
on 2021-06-08 15:23:31 UTC
(
hide
)
Description:
libusb patch that fixes the race
Filename:
MIME Type:
Creator:
Sergii
Created:
2021-06-08 15:23:31 UTC
Size:
657 bytes
patch
obsolete
>diff --git a/lib/libusb/libusb10_io.c b/lib/libusb/libusb10_io.c >index 53f5b0404..cb4eba72b 100644 >--- a/lib/libusb/libusb10_io.c >+++ b/lib/libusb/libusb10_io.c >@@ -165,8 +165,10 @@ libusb10_handle_events_sub(struct libusb_context *ctx, struct timeval *tv) > err = libusb20_dev_process(ppdev[i]); > > if (err) { >- /* set device is gone */ >- dev->device_is_gone = 1; >+ /* set device is gone unless it's closed in which case >+ * polling result should be discarded */ >+ if (ppdev[i]->is_opened) >+ dev->device_is_gone = 1; > > /* remove USB device from polling loop */ > libusb10_remove_pollfd(dev->ctx, &dev->dev_poll);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 256296
:
225431
|
225579
| 225640