summaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/main.c b/src/main.c
index 3ab7139..1efc228 100644
--- a/src/main.c
+++ b/src/main.c
@@ -45,7 +45,10 @@ int main(int argc, char *argv[]) {
45 int bytes = 0, port = 0, i = 0; 45 int bytes = 0, port = 0, i = 0;
46 if (phone) printf("I got a phone.\n"); 46 if (phone) printf("I got a phone.\n");
47 else { printf("oops\n"); return -1; } 47 else { printf("oops\n"); return -1; }
48 48
49 lockdownd_client *control = NULL;
50 lockdownd_init(phone, &control);
51 /*
49 lockdownd_client *control = new_lockdownd_client(phone); 52 lockdownd_client *control = new_lockdownd_client(phone);
50 if (!lockdownd_hello(control)) { 53 if (!lockdownd_hello(control)) {
51 printf("Something went wrong in the lockdownd client, go take a look.\n"); 54 printf("Something went wrong in the lockdownd client, go take a look.\n");
@@ -59,10 +62,10 @@ int main(int argc, char *argv[]) {
59 printf("Error happened in GnuTLS...\n"); 62 printf("Error happened in GnuTLS...\n");
60 } else { 63 } else {
61 free(host_id); 64 free(host_id);
62 host_id = NULL; 65 host_id = NULL;*/
63 printf("... we're in SSL with the phone... !?\n"); 66 printf("... we're in SSL with the phone... !?\n");
64 port = lockdownd_start_service(control, "com.apple.afc"); 67 port = lockdownd_start_service(control, "com.apple.afc");
65 } 68 //}
66 if (port) { 69 if (port) {
67 printf("Start Service successful -- connect on port %i\n", port); 70 printf("Start Service successful -- connect on port %i\n", port);
68 AFClient *afc = afc_connect(phone, 3432, port); 71 AFClient *afc = afc_connect(phone, 3432, port);