summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/ifuse.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/src/ifuse.c b/src/ifuse.c
index 6a24bad..f0f93a9 100644
--- a/src/ifuse.c
+++ b/src/ifuse.c
@@ -184,22 +184,14 @@ void *ifuse_init(struct fuse_conn_info *conn) {
184 iPhone *phone = get_iPhone(); 184 iPhone *phone = get_iPhone();
185 if (!phone){ 185 if (!phone){
186 fprintf(stderr, "No iPhone found, is it connected?\n"); 186 fprintf(stderr, "No iPhone found, is it connected?\n");
187 return NULL;
188 }
189
190 lockdownd_client *control = new_lockdownd_client(phone);
191 if (!lockdownd_hello(control)) {
192 fprintf(stderr, "Something went wrong in the lockdownd client.\n");
193 return NULL; 187 return NULL;
194 } 188 }
195 189
196 host_id = get_host_id(); 190 lockdownd_client *control = NULL;
197 if ((host_id && !lockdownd_start_SSL_session(control, host_id)) || !host_id) { 191 if (!lockdownd_init(phone, &control)) {
198 fprintf(stderr, "Something went wrong in GnuTLS. Is your HostID configured in .config/libiphone/libiphonerc?\n"); 192 fprintf(stderr, "Something went wrong in the lockdownd client.\n");
199 return NULL; 193 return NULL;
200 } 194 }
201 free(host_id);
202 host_id = NULL;
203 195
204 port = lockdownd_start_service(control, "com.apple.afc"); 196 port = lockdownd_start_service(control, "com.apple.afc");
205 if (!port) { 197 if (!port) {