diff options
author | Nikias Bassen | 2021-01-09 04:15:58 +0100 |
---|---|---|
committer | Nikias Bassen | 2021-01-09 04:15:58 +0100 |
commit | 7021c1ae173abfa47c67d883e8eacad75986d2f2 (patch) | |
tree | 58320ce69e65639364f7b234e70b6431d1ab47e5 | |
parent | bf2e2ec054102286ad6ab272be42c21034c136ed (diff) | |
download | usbmuxd-7021c1ae173abfa47c67d883e8eacad75986d2f2.tar.gz usbmuxd-7021c1ae173abfa47c67d883e8eacad75986d2f2.tar.bz2 |
usb: Don't warn about old configuration descriptor if device is unconfigured
-rw-r--r-- | src/usb.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -429,7 +429,9 @@ static int usb_device_add(libusb_device* dev) } if (current_config != desired_config) { struct libusb_config_descriptor *config; - if((res = libusb_get_active_config_descriptor(dev, &config)) != 0) { + if (current_config == 0) { + usbmuxd_log(LL_DEBUG, "Device %d-%d is unconfigured", bus, address); + } else if ((res = libusb_get_active_config_descriptor(dev, &config)) != 0) { usbmuxd_log(LL_NOTICE, "Could not get old configuration descriptor for device %d-%d: %s", bus, address, libusb_error_name(res)); } else { for(j=0; j<config->bNumInterfaces; j++) { |