summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/usb.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/usb.c b/src/usb.c
index 571a822..e334707 100644
--- a/src/usb.c
+++ b/src/usb.c
@@ -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++) {