summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Jonathan Beck2008-08-11 22:48:44 +0200
committerGravatar Matt Colyer2008-08-12 08:57:04 -0700
commitbb74e8fd0041132379d525030ed277b49f972494 (patch)
tree0dac99fa09043f0abfcfaa6a6163afaab29785d7
parent8d5c88acc75871d2ec59793f312dc0fe0c54351f (diff)
downloadlibimobiledevice-bb74e8fd0041132379d525030ed277b49f972494.tar.gz
libimobiledevice-bb74e8fd0041132379d525030ed277b49f972494.tar.bz2
make ifuse use lockdownd_init so that pairing is done if necessary.
-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) {