summaryrefslogtreecommitdiffstats
path: root/src/lockdown.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/lockdown.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/lockdown.c')
-rw-r--r--src/lockdown.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/lockdown.c b/src/lockdown.c
index 452f036..c1b846d 100644
--- a/src/lockdown.c
+++ b/src/lockdown.c
@@ -21,6 +21,7 @@
21#include "usbmux.h" 21#include "usbmux.h"
22#include "iphone.h" 22#include "iphone.h"
23#include "lockdown.h" 23#include "lockdown.h"
24#include "userpref.h"
24#include <errno.h> 25#include <errno.h>
25#include <string.h> 26#include <string.h>
26 27
@@ -318,12 +319,17 @@ ssize_t lockdownd_securead(gnutls_transport_ptr_t transport, char *buffer, size_
318 319
319int lockdownd_start_service(lockdownd_client *control, const char *service) { 320int lockdownd_start_service(lockdownd_client *control, const char *service) {
320 if (!control) return 0; 321 if (!control) return 0;
321 if (!control->in_SSL && !lockdownd_start_SSL_session(control, "29942970-207913891623273984")) return 0; 322
322 323 char* host_id = get_host_id();
324 if (host_id && !control->in_SSL && !lockdownd_start_SSL_session(control, host_id)) return 0;
325
323 char *XML_query, **dictionary; 326 char *XML_query, **dictionary;
324 uint32 length, i = 0, port = 0; 327 uint32 length, i = 0, port = 0;
325 uint8 result = 0; 328 uint8 result = 0;
326 329
330 free(host_id);
331 host_id = NULL;
332
327 xmlDocPtr plist = new_plist(); 333 xmlDocPtr plist = new_plist();
328 xmlNode *dict = add_child_to_plist(plist, "dict", "\n", NULL, 0); 334 xmlNode *dict = add_child_to_plist(plist, "dict", "\n", NULL, 0);
329 xmlNode *key; 335 xmlNode *key;