summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar Matt Colyer2008-08-12 23:34:11 -0700
committerGravatar Matt Colyer2008-08-12 23:34:11 -0700
commit15bb91aabae62ab0f26b34ecf7ddf9ed1aeaf172 (patch)
treee420f63392eaeadb97258ff4349c7bc956dd8620 /src
parent9fbadfad2af22767cce6a620a1f5b91f16479e05 (diff)
downloadlibimobiledevice-15bb91aabae62ab0f26b34ecf7ddf9ed1aeaf172.tar.gz
libimobiledevice-15bb91aabae62ab0f26b34ecf7ddf9ed1aeaf172.tar.bz2
Reverted bb74e8fd0041132379d525030ed277b49f972494, as I can no longer connect
to my phone with that patch applied.
Diffstat (limited to 'src')
-rw-r--r--src/ifuse.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/ifuse.c b/src/ifuse.c
index f0f93a9..6a24bad 100644
--- a/src/ifuse.c
+++ b/src/ifuse.c
@@ -184,14 +184,22 @@ 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;
}
- lockdownd_client *control = NULL;
- if (!lockdownd_init(phone, &control)) {
- fprintf(stderr, "Something went wrong in the lockdownd client.\n");
+ 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");
return NULL;
}
+ free(host_id);
+ host_id = NULL;
port = lockdownd_start_service(control, "com.apple.afc");
if (!port) {