|
|
@ -1073,12 +1073,15 @@ void usb_detect(struct device_drv *drv, bool (*device_detect)(struct libusb_devi |
|
|
|
|
|
|
|
|
|
|
|
for (i = 0; i < count; i++) { |
|
|
|
for (i = 0; i < count; i++) { |
|
|
|
found = usb_check(drv, list[i]); |
|
|
|
found = usb_check(drv, list[i]); |
|
|
|
if (found) { |
|
|
|
if (found != NULL) { |
|
|
|
if (cgminer_usb_lock(drv, list[i]) == true) |
|
|
|
if (cgminer_usb_lock(drv, list[i]) == false) |
|
|
|
|
|
|
|
free(found); |
|
|
|
|
|
|
|
else { |
|
|
|
if (!device_detect(list[i], found)) |
|
|
|
if (!device_detect(list[i], found)) |
|
|
|
cgminer_usb_unlock(drv, list[i]); |
|
|
|
cgminer_usb_unlock(drv, list[i]); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
libusb_free_device_list(list, 1); |
|
|
|
libusb_free_device_list(list, 1); |
|
|
|
} |
|
|
|
} |
|
|
|