diff options
Diffstat (limited to 'src/ifuse.c')
| -rw-r--r-- | src/ifuse.c | 14 |
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) { | |||
| 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"); | ||
| 187 | return NULL; | 193 | return NULL; |
| 188 | } | 194 | } |
| 189 | 195 | ||
| 190 | lockdownd_client *control = NULL; | 196 | host_id = get_host_id(); |
| 191 | if (!lockdownd_init(phone, &control)) { | 197 | if ((host_id && !lockdownd_start_SSL_session(control, host_id)) || !host_id) { |
| 192 | fprintf(stderr, "Something went wrong in the lockdownd client.\n"); | 198 | fprintf(stderr, "Something went wrong in GnuTLS. Is your HostID configured in .config/libiphone/libiphonerc?\n"); |
| 193 | return NULL; | 199 | return NULL; |
| 194 | } | 200 | } |
| 201 | free(host_id); | ||
| 202 | host_id = NULL; | ||
| 195 | 203 | ||
| 196 | port = lockdownd_start_service(control, "com.apple.afc"); | 204 | port = lockdownd_start_service(control, "com.apple.afc"); |
| 197 | if (!port) { | 205 | if (!port) { |
