richcomm_usb: fix common USB matching flow (#1768)#3477
Conversation
|
A ZIP file with standard source tarball and another tarball with pre-built docs for commit ee6b2b0 is temporarily available: NUT-tarballs-PR-3477.zip. |
Signed-off-by: mbv06 <mbv06.dev@gmail.com>
Signed-off-by: mbv06 <mbv06.dev@gmail.com>
62521fa to
25b8187
Compare
|
✅ Build nut 2.8.5.4818-master completed (commit 34584702a8 by @mbv06)
|
|
✅ Build nut 2.8.5.4818-master completed (commit 34584702a8 by @mbv06) |
|
✅ Build nut 2.8.5.4819-master completed (commit a42d620755 by @mbv06)
|
jimklimov
left a comment
There was a problem hiding this comment.
Thanks, looks quite right. I hope CI will soon come to its senses too, it's in the midst of agent OS upgrades last week so is acting up; I'll schedule re-runs when that quiets down.
Adding a NEWS.adoc entry would be useful, but I can do it to trigger the CI rebuild when the farm is readier than it is today :)
|
Sure, I can add a small I also noticed I forgot to bump the |
…he improvements [networkupstools#1768, networkupstools#3477] Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
|
Updated, hopefully CI feels better now :D |
|
✅ Build nut 2.8.5.4820-master completed (commit 947fa6aa95 by @jimklimov)
|
|
mingw faults seem to be due to OOM on builder :\ UPDATE: Raised its RAM/Swap allowance, hope that would help. |
Summary
Fixes #1768.
This change completes the common USB matching support in
richcomm_usb. The driver now exposes the standard USB matching options and actually uses them during device selection, so the configuration generated bynut-scannercan be used directly.// Used existing patterns from
blazer_usbandriello_usbIt also fixes the USB scan cleanup path. (1st commit)
Previously, probing a candidate USB device could cause the driver to take the close path and unload libusb while the scan was still in progress. The scan then continued with libusb already torn down, which could lead to access violations or crashes on Windows.
The descriptor-based VID:PID check is kept as an early guard before opening candidate devices. This avoids opening unrelated USB devices during scan, which also reduces exposure to the problematic path and is especially useful on Windows.
Testing
Built and tested on Windows 11 and an Ubuntu 24.04 LTS VM with my UPS.