diff options
author | Jonathan Beck | 2008-08-11 22:48:44 +0200 |
---|---|---|
committer | Matt Colyer | 2008-08-12 08:57:04 -0700 |
commit | bb74e8fd0041132379d525030ed277b49f972494 (patch) | |
tree | 0dac99fa09043f0abfcfaa6a6163afaab29785d7 /src | |
parent | 8d5c88acc75871d2ec59793f312dc0fe0c54351f (diff) | |
download | libimobiledevice-bb74e8fd0041132379d525030ed277b49f972494.tar.gz libimobiledevice-bb74e8fd0041132379d525030ed277b49f972494.tar.bz2 |
make ifuse use lockdownd_init so that pairing is done if necessary.
Diffstat (limited to 'src')
-rw-r--r-- | src/ifuse.c | 14 |
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) { iPhone *phone = get_iPhone(); if (!phone){ fprintf(stderr, "No iPhone found, is it connected?\n"); - return NULL; - } - - lockdownd_client *control = new_lockdownd_client(phone); - if (!lockdownd_hello(control)) { - fprintf(stderr, "Something went wrong in the lockdownd client.\n"); return NULL; } - host_id = get_host_id(); - if ((host_id && !lockdownd_start_SSL_session(control, host_id)) || !host_id) { - fprintf(stderr, "Something went wrong in GnuTLS. Is your HostID configured in .config/libiphone/libiphonerc?\n"); + lockdownd_client *control = NULL; + if (!lockdownd_init(phone, &control)) { + fprintf(stderr, "Something went wrong in the lockdownd client.\n"); return NULL; } - free(host_id); - host_id = NULL; port = lockdownd_start_service(control, "com.apple.afc"); if (!port) { |