Commit bb74e8fd authored by Jonathan Beck's avatar Jonathan Beck Committed by Matt Colyer

make ifuse use lockdownd_init so that pairing is done if necessary.

parent 8d5c88ac
...@@ -187,20 +187,12 @@ void *ifuse_init(struct fuse_conn_info *conn) { ...@@ -187,20 +187,12 @@ void *ifuse_init(struct fuse_conn_info *conn) {
return NULL; return NULL;
} }
lockdownd_client *control = new_lockdownd_client(phone); lockdownd_client *control = NULL;
if (!lockdownd_hello(control)) { if (!lockdownd_init(phone, &control)) {
fprintf(stderr, "Something went wrong in the lockdownd client.\n"); fprintf(stderr, "Something went wrong in the lockdownd client.\n");
return NULL; 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");
return NULL;
}
free(host_id);
host_id = NULL;
port = lockdownd_start_service(control, "com.apple.afc"); port = lockdownd_start_service(control, "com.apple.afc");
if (!port) { if (!port) {
fprintf(stderr, "Something went wrong when starting AFC."); fprintf(stderr, "Something went wrong when starting AFC.");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment