forked from networkupstools/nut
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
usb-common.c: Add API-neutral nut_usb_get_string()
This function doesn't use usb_get_string_simple() from libusb0 or libusb_get_string_descriptor_ascii() from libusb1 but replaces them to be able to add a workaround for devices with broken langid descriptors. If the langid descriptor is invalid, the en_US language is assumed. (See networkupstools#1925) It also adds retries to the string descriptor fetching, which may help in some cases. (See networkupstools#414) A small delay is introduced between the retries. Signed-off-by: Tormod Volden <[email protected]>
- Loading branch information
1 parent
0f4d80f
commit 130d830
Showing
2 changed files
with
87 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters