summaryrefslogtreecommitdiffstats
path: root/src/libirecovery.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libirecovery.c')
-rw-r--r--src/libirecovery.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/libirecovery.c b/src/libirecovery.c
index 2491b66..0babf1d 100644
--- a/src/libirecovery.c
+++ b/src/libirecovery.c
@@ -1615,15 +1615,11 @@ static irecv_error_t iokit_open_with_ecid(irecv_client_t* pclient, uint64_t ecid
1615 return iokit_usb_open_service(pclient, ret_service); 1615 return iokit_usb_open_service(pclient, ret_service);
1616} 1616}
1617#endif 1617#endif
1618#endif
1619 1618
1620#ifndef WIN32 1619#ifndef WIN32
1621#ifndef HAVE_IOKIT 1620#ifndef HAVE_IOKIT
1622static irecv_error_t libusb_usb_open_handle_with_descriptor_and_ecid(irecv_client_t *pclient, struct libusb_device_handle *usb_handle, struct libusb_device_descriptor *usb_descriptor, uint64_t ecid) 1621static irecv_error_t libusb_usb_open_handle_with_descriptor_and_ecid(irecv_client_t *pclient, struct libusb_device_handle *usb_handle, struct libusb_device_descriptor *usb_descriptor, uint64_t ecid)
1623{ 1622{
1624 irecv_error_t ret = IRECV_E_UNABLE_TO_CONNECT;
1625 irecv_error_t error = IRECV_E_UNABLE_TO_CONNECT;
1626
1627 irecv_client_t client = (irecv_client_t) malloc(sizeof(struct irecv_client_private)); 1623 irecv_client_t client = (irecv_client_t) malloc(sizeof(struct irecv_client_private));
1628 if (client == NULL) { 1624 if (client == NULL) {
1629 libusb_close(usb_handle); 1625 libusb_close(usb_handle);
@@ -1650,9 +1646,8 @@ static irecv_error_t libusb_usb_open_handle_with_descriptor_and_ecid(irecv_clien
1650 debug("found device with ECID %016" PRIx64 "\n", (uint64_t)ecid); 1646 debug("found device with ECID %016" PRIx64 "\n", (uint64_t)ecid);
1651 } 1647 }
1652 1648
1653 ret = IRECV_E_SUCCESS;
1654 *pclient = client; 1649 *pclient = client;
1655 return ret; 1650 return IRECV_E_SUCCESS;
1656} 1651}
1657 1652
1658static irecv_error_t libusb_open_with_ecid(irecv_client_t* pclient, uint64_t ecid) 1653static irecv_error_t libusb_open_with_ecid(irecv_client_t* pclient, uint64_t ecid)
@@ -1719,6 +1714,7 @@ static irecv_error_t libusb_open_with_ecid(irecv_client_t* pclient, uint64_t eci
1719} 1714}
1720#endif 1715#endif
1721#endif 1716#endif
1717#endif
1722 1718
1723irecv_error_t irecv_open_with_ecid(irecv_client_t* pclient, uint64_t ecid) 1719irecv_error_t irecv_open_with_ecid(irecv_client_t* pclient, uint64_t ecid)
1724{ 1720{
@@ -3062,7 +3058,6 @@ static irecv_error_t irecv_get_status(irecv_client_t client, unsigned int* statu
3062 3058
3063 return IRECV_E_SUCCESS; 3059 return IRECV_E_SUCCESS;
3064} 3060}
3065#endif
3066 3061
3067static irecv_error_t irecv_kis_send_buffer(irecv_client_t client, unsigned char* buffer, unsigned long length, int dfu_notify_finished) 3062static irecv_error_t irecv_kis_send_buffer(irecv_client_t client, unsigned char* buffer, unsigned long length, int dfu_notify_finished)
3068{ 3063{
@@ -3126,6 +3121,7 @@ static irecv_error_t irecv_kis_send_buffer(irecv_client_t client, unsigned char*
3126 3121
3127 return IRECV_E_SUCCESS; 3122 return IRECV_E_SUCCESS;
3128} 3123}
3124#endif
3129 3125
3130irecv_error_t irecv_send_buffer(irecv_client_t client, unsigned char* buffer, unsigned long length, int dfu_notify_finished) 3126irecv_error_t irecv_send_buffer(irecv_client_t client, unsigned char* buffer, unsigned long length, int dfu_notify_finished)
3131{ 3127{