Skip to content

Commit 5875c9b

Browse files
committed
webinspector.c: sync private structures with libimobiledevice HEAD
1 parent ba9a3f4 commit 5875c9b

File tree

1 file changed

+16
-7
lines changed

1 file changed

+16
-7
lines changed

src/webinspector.c

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ struct wi_private {
5353
// CONNECT
5454
//
5555

56-
// based on libimobiledevice/src/idevice.h
56+
#ifndef HAVE_IDEVICE_CONNECTION_GET_FD
57+
// based on libimobiledevice 1.2.0
5758
enum connection_type {
5859
CONNECTION_USBMUXD = 1
5960
};
@@ -63,13 +64,7 @@ struct idevice_connection_private {
6364
void *data;
6465
void *ssl_data;
6566
};
66-
struct ssl_data_private {
67-
SSL *session;
68-
SSL_CTX *ctx;
69-
};
70-
typedef struct ssl_data_private *ssl_data_t;
7167

72-
#ifndef HAVE_IDEVICE_CONNECTION_GET_FD
7368
wi_status idevice_connection_get_fd(idevice_connection_t connection,
7469
int *to_fd) {
7570
if (!connection || !to_fd) {
@@ -93,8 +88,22 @@ wi_status idevice_connection_get_fd(idevice_connection_t connection,
9388
*to_fd = fd;
9489
return WI_SUCCESS;
9590
}
91+
#else
92+
// based on latest libimobiledevice/src/idevice.h
93+
struct idevice_connection_private {
94+
idevice_t device;
95+
enum idevice_connection_type type;
96+
void *data;
97+
void *ssl_data;
98+
};
9699
#endif
97100

101+
struct ssl_data_private {
102+
SSL *session;
103+
SSL_CTX *ctx;
104+
};
105+
typedef struct ssl_data_private *ssl_data_t;
106+
98107
wi_status idevice_connection_get_ssl_session(idevice_connection_t connection,
99108
SSL **to_session) {
100109
if (!connection || !to_session) {

0 commit comments

Comments
 (0)