diff options
| -rw-r--r-- | libirecovery.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/libirecovery.c b/libirecovery.c index b83a8d2..c061b2f 100644 --- a/libirecovery.c +++ b/libirecovery.c | |||
| @@ -505,6 +505,9 @@ int irecv_get_string_descriptor_ascii(irecv_client_t client, uint8_t desc_index, | |||
| 505 | } | 505 | } |
| 506 | 506 | ||
| 507 | irecv_error_t irecv_open(irecv_client_t* pclient, unsigned long long ecid) { | 507 | irecv_error_t irecv_open(irecv_client_t* pclient, unsigned long long ecid) { |
| 508 | if(libirecovery_debug) { | ||
| 509 | irecv_set_debug_level(libirecovery_debug); | ||
| 510 | } | ||
| 508 | #ifndef WIN32 | 511 | #ifndef WIN32 |
| 509 | int i = 0; | 512 | int i = 0; |
| 510 | struct libusb_device* usb_device = NULL; | 513 | struct libusb_device* usb_device = NULL; |
| @@ -513,10 +516,6 @@ irecv_error_t irecv_open(irecv_client_t* pclient, unsigned long long ecid) { | |||
| 513 | struct libusb_device_descriptor usb_descriptor; | 516 | struct libusb_device_descriptor usb_descriptor; |
| 514 | 517 | ||
| 515 | *pclient = NULL; | 518 | *pclient = NULL; |
| 516 | if(libirecovery_debug) { | ||
| 517 | irecv_set_debug_level(libirecovery_debug); | ||
| 518 | } | ||
| 519 | |||
| 520 | irecv_error_t error = IRECV_E_SUCCESS; | 519 | irecv_error_t error = IRECV_E_SUCCESS; |
| 521 | int usb_device_count = libusb_get_device_list(libirecovery_context, &usb_device_list); | 520 | int usb_device_count = libusb_get_device_list(libirecovery_context, &usb_device_list); |
| 522 | for (i = 0; i < usb_device_count; i++) { | 521 | for (i = 0; i < usb_device_count; i++) { |
