diff options
| -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 | |||
| 762 | } | 762 | } |
| 763 | 763 | ||
| 764 | plist_free(pair_record); | 764 | plist_free(pair_record); |
| 765 | pair_record = NULL; | ||
| 765 | 766 | ||
| 766 | /* in any case, we need to validate pairing to receive trusted host status */ | 767 | /* in any case, we need to validate pairing to receive trusted host status */ |
| 767 | ret = lockdownd_validate_pair(client_loc, NULL); | 768 | ret = lockdownd_validate_pair(client_loc, NULL); |
| @@ -778,6 +779,12 @@ lockdownd_error_t lockdownd_client_new_with_handshake(idevice_t device, lockdown | |||
| 778 | } | 779 | } |
| 779 | 780 | ||
| 780 | if (LOCKDOWN_E_SUCCESS == ret) { | 781 | if (LOCKDOWN_E_SUCCESS == ret) { |
| 782 | if (!host_id) { | ||
| 783 | userpref_read_pair_record(client_loc->udid, &pair_record); | ||
| 784 | pair_record_get_host_id(pair_record, &host_id); | ||
| 785 | plist_free(pair_record); | ||
| 786 | } | ||
| 787 | |||
| 781 | ret = lockdownd_start_session(client_loc, host_id, NULL, NULL); | 788 | ret = lockdownd_start_session(client_loc, host_id, NULL, NULL); |
| 782 | if (LOCKDOWN_E_SUCCESS != ret) { | 789 | if (LOCKDOWN_E_SUCCESS != ret) { |
| 783 | debug_info("Session opening failed."); | 790 | debug_info("Session opening failed."); |
