From bb74e8fd0041132379d525030ed277b49f972494 Mon Sep 17 00:00:00 2001 From: Jonathan Beck Date: Mon, 11 Aug 2008 22:48:44 +0200 Subject: make ifuse use lockdownd_init so that pairing is done if necessary. --- src/ifuse.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to 'src') 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) { -- cgit v1.1-32-gdbae