summaryrefslogtreecommitdiffstats
path: root/src/libirecovery.c
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2021-09-13 20:28:16 +0200
committerGravatar Nikias Bassen2021-09-13 20:28:16 +0200
commit40b25fd572bf94d65e880a216bba5e825e5bbf2d (patch)
treeb6df709be2dbdec2186df1c7e2bec211b8d0dec5 /src/libirecovery.c
parentbcf56b30fea3b841ee11a9b4f3ac74f6de465f3d (diff)
downloadlibirecovery-40b25fd572bf94d65e880a216bba5e825e5bbf2d.tar.gz
libirecovery-40b25fd572bf94d65e880a216bba5e825e5bbf2d.tar.bz2
Remove duplicated thread/collection code and use new libimobiledevice-glue instead
Diffstat (limited to 'src/libirecovery.c')
-rw-r--r--src/libirecovery.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/libirecovery.c b/src/libirecovery.c
index 2219f36..0446e01 100644
--- a/src/libirecovery.c
+++ b/src/libirecovery.c
@@ -32,11 +32,13 @@
32#include <unistd.h> 32#include <unistd.h>
33#include <sys/stat.h> 33#include <sys/stat.h>
34 34
35#include <libimobiledevice-glue/collection.h>
36#include <libimobiledevice-glue/thread.h>
37
35#ifndef USE_DUMMY 38#ifndef USE_DUMMY
36#ifndef WIN32 39#ifndef WIN32
37#ifndef HAVE_IOKIT 40#ifndef HAVE_IOKIT
38#include <libusb.h> 41#include <libusb.h>
39#include <pthread.h>
40#if (defined(LIBUSB_API_VERSION) && (LIBUSB_API_VERSION >= 0x01000102)) || (defined(LIBUSBX_API_VERSION) && (LIBUSBX_API_VERSION >= 0x01000102)) 42#if (defined(LIBUSB_API_VERSION) && (LIBUSB_API_VERSION >= 0x01000102)) || (defined(LIBUSBX_API_VERSION) && (LIBUSBX_API_VERSION >= 0x01000102))
41#define HAVE_LIBUSB_HOTPLUG_API 1 43#define HAVE_LIBUSB_HOTPLUG_API 1
42#endif 44#endif
@@ -44,7 +46,6 @@
44#include <CoreFoundation/CoreFoundation.h> 46#include <CoreFoundation/CoreFoundation.h>
45#include <IOKit/usb/IOUSBLib.h> 47#include <IOKit/usb/IOUSBLib.h>
46#include <IOKit/IOCFPlugIn.h> 48#include <IOKit/IOCFPlugIn.h>
47#include <pthread.h>
48#endif 49#endif
49#else 50#else
50#define WIN32_LEAN_AND_MEAN 51#define WIN32_LEAN_AND_MEAN
@@ -67,8 +68,6 @@
67#endif 68#endif
68 69
69#include "libirecovery.h" 70#include "libirecovery.h"
70#include "utils.h"
71#include "thread.h"
72 71
73struct irecv_client_private { 72struct irecv_client_private {
74 int debug; 73 int debug;
@@ -2977,8 +2976,8 @@ IRECV_API irecv_error_t irecv_trigger_limera1n_exploit(irecv_client_t client) {
2977 // which can be accomplished by sending on another thread. 2976 // which can be accomplished by sending on another thread.
2978 2977
2979 void *args[2] = { client->handle, &req }; 2978 void *args[2] = { client->handle, &req };
2980 pthread_t thread; 2979 THREAD_T thread;
2981 pthread_create(&thread, NULL, iokit_limera1n_usb_submit_request, args); 2980 thread_new(&thread, iokit_limera1n_usb_submit_request, args);
2982 2981
2983 usleep(5 * 1000); 2982 usleep(5 * 1000);
2984 result = (*client->handle)->USBDeviceAbortPipeZero(client->handle); 2983 result = (*client->handle)->USBDeviceAbortPipeZero(client->handle);