summaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
authorGravatar Jonathan Beck2008-07-31 21:54:16 -0700
committerGravatar Matt Colyer2008-07-31 21:54:16 -0700
commitd05ae226356cc674a055c784a4b9b75825162ba6 (patch)
tree9cfff8c5e5f90c4d5b0d7e36a2b1ac5b78a4baf9 /src/main.c
parentbbd289b44c94aeb327675352d187209639e64baa (diff)
downloadlibimobiledevice-d05ae226356cc674a055c784a4b9b75825162ba6.tar.gz
libimobiledevice-d05ae226356cc674a055c784a4b9b75825162ba6.tar.bz2
Added a way to load HostID from a user specific config file.
Signed-off-by: Matt Colyer <matt@colyer.name>
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index 34126d7..e42440f 100644
--- a/src/main.c
+++ b/src/main.c
@@ -31,10 +31,12 @@
31#include "plist.h" 31#include "plist.h"
32#include "lockdown.h" 32#include "lockdown.h"
33#include "AFC.h" 33#include "AFC.h"
34#include "userpref.h"
34 35
35int debug = 1; 36int debug = 1;
36 37
37int main(int argc, char *argv[]) { 38int main(int argc, char *argv[]) {
39 char* host_id = NULL;
38 iPhone *phone = get_iPhone(); 40 iPhone *phone = get_iPhone();
39 if (argc > 1 && !strcasecmp(argv[1], "--debug")) debug = 1; 41 if (argc > 1 && !strcasecmp(argv[1], "--debug")) debug = 1;
40 else debug = 0; 42 else debug = 0;
@@ -51,9 +53,12 @@ int main(int argc, char *argv[]) {
51 } 53 }
52 54
53 printf("Now starting SSL.\n"); 55 printf("Now starting SSL.\n");
54// if (!lockdownd_start_SSL_session(control, "29942970-207913891623273984")) { 56 host_id = get_host_id();
57 if (host_id && !lockdownd_start_SSL_session(control, host_id)) {
55 printf("Error happened in GnuTLS...\n"); 58 printf("Error happened in GnuTLS...\n");
56 } else { 59 } else {
60 free(host_id);
61 host_id = NULL;
57 printf("... we're in SSL with the phone... !?\n"); 62 printf("... we're in SSL with the phone... !?\n");
58 port = lockdownd_start_service(control, "com.apple.afc"); 63 port = lockdownd_start_service(control, "com.apple.afc");
59 } 64 }