diff options
author | Jonathan Beck | 2008-08-11 22:35:48 +0200 |
---|---|---|
committer | Jonathan Beck | 2008-08-31 19:27:19 +0200 |
commit | bbc6306a24517ebaa1308c782579e028deeb4750 (patch) | |
tree | 0bb62d4eefaa071069482ba216b6d902b7720a70 /src | |
parent | e1b22c51edd2c3b416d111a63e1a84ab3ba7817e (diff) | |
download | libplist-bbc6306a24517ebaa1308c782579e028deeb4750.tar.gz libplist-bbc6306a24517ebaa1308c782579e028deeb4750.tar.bz2 |
fix some warnings
Diffstat (limited to 'src')
-rw-r--r-- | src/lockdown.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/lockdown.c b/src/lockdown.c index 452ee0e..7cee12e 100644 --- a/src/lockdown.c +++ b/src/lockdown.c @@ -315,18 +315,18 @@ int lockdownd_init(iPhone_t phone, lockdownd_client_t *control) if (!phone) return 0; - *control = new_lockdownd_client(phone); - if (!lockdownd_hello(*control)){ + lockdownd_client *control_loc = new_lockdownd_client( (iPhone*)phone ); + if (!lockdownd_hello(control_loc)){ fprintf(stderr, "Hello failed in the lockdownd client.\n"); } char *uid = NULL; - if(!lockdownd_get_device_uid(*control, &uid)){ + if(!lockdownd_get_device_uid(control_loc, &uid)){ fprintf(stderr, "Device refused to send public key.\n"); } host_id = get_host_id(); - + if (!is_device_known(uid)) ret = lockdownd_pair_device(*control, uid, host_id); else @@ -337,7 +337,8 @@ int lockdownd_init(iPhone_t phone, lockdownd_client_t *control) uid = NULL; } - if (ret && host_id && lockdownd_start_SSL_session(*control, host_id)) { + + if (ret && host_id && lockdownd_start_SSL_session(control_loc, host_id)) { ret = 1; } else { ret = 0; @@ -349,6 +350,8 @@ int lockdownd_init(iPhone_t phone, lockdownd_client_t *control) host_id = NULL; } + *control = (lockdownd_client_t)control_loc; + return ret; } |