diff options
author | Martin Szulecki | 2014-03-21 20:03:58 +0100 |
---|---|---|
committer | Martin Szulecki | 2014-03-21 20:03:58 +0100 |
commit | 4bb1fd768ccf6dc6eda4a7af5638abca553bc673 (patch) | |
tree | 14a202192770c8df30b4d5d373cfa09db357dec3 /src | |
parent | dbede29466197702c58b806f356f1fa26223d68a (diff) | |
download | libimobiledevice-4bb1fd768ccf6dc6eda4a7af5638abca553bc673.tar.gz libimobiledevice-4bb1fd768ccf6dc6eda4a7af5638abca553bc673.tar.bz2 |
lockdown: Read HostID again after pairing to fix first pair workflow
Diffstat (limited to 'src')
-rw-r--r-- | src/lockdown.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/lockdown.c b/src/lockdown.c index 0efe30e..ab99ae2 100644 --- a/src/lockdown.c +++ b/src/lockdown.c @@ -762,6 +762,7 @@ lockdownd_error_t lockdownd_client_new_with_handshake(idevice_t device, lockdown } plist_free(pair_record); + pair_record = NULL; /* in any case, we need to validate pairing to receive trusted host status */ ret = lockdownd_validate_pair(client_loc, NULL); @@ -778,6 +779,12 @@ lockdownd_error_t lockdownd_client_new_with_handshake(idevice_t device, lockdown } if (LOCKDOWN_E_SUCCESS == ret) { + if (!host_id) { + userpref_read_pair_record(client_loc->udid, &pair_record); + pair_record_get_host_id(pair_record, &host_id); + plist_free(pair_record); + } + ret = lockdownd_start_session(client_loc, host_id, NULL, NULL); if (LOCKDOWN_E_SUCCESS != ret) { debug_info("Session opening failed."); |