summaryrefslogtreecommitdiffstats
path: root/src/preflight.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/preflight.c')
-rw-r--r--src/preflight.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/preflight.c b/src/preflight.c
index def6a82..283c6d9 100644
--- a/src/preflight.c
+++ b/src/preflight.c
@@ -36,6 +36,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
36 36
37#include "preflight.h" 37#include "preflight.h"
38#include "client.h" 38#include "client.h"
39#include "conf.h"
39#include "log.h" 40#include "log.h"
40 41
41#ifdef HAVE_LIBIMOBILEDEVICE 42#ifdef HAVE_LIBIMOBILEDEVICE
@@ -55,12 +56,10 @@ struct cb_data {
55 int is_device_connected; 56 int is_device_connected;
56}; 57};
57 58
58extern uint16_t userpref_remove_device_record(const char* udid);
59
60static void lockdownd_set_untrusted_host_buid(lockdownd_client_t lockdown) 59static void lockdownd_set_untrusted_host_buid(lockdownd_client_t lockdown)
61{ 60{
62 char* system_buid = NULL; 61 char* system_buid = NULL;
63 userpref_get_system_buid(&system_buid); 62 config_get_system_buid(&system_buid);
64 usbmuxd_log(LL_DEBUG, "%s: Setting UntrustedHostBUID to %s", __func__, system_buid); 63 usbmuxd_log(LL_DEBUG, "%s: Setting UntrustedHostBUID to %s", __func__, system_buid);
65 lockdownd_set_value(lockdown, NULL, "UntrustedHostBUID", plist_new_string(system_buid)); 64 lockdownd_set_value(lockdown, NULL, "UntrustedHostBUID", plist_new_string(system_buid));
66 free(system_buid); 65 free(system_buid);
@@ -162,7 +161,7 @@ retry:
162 161
163 int is_device_paired = 0; 162 int is_device_paired = 0;
164 char *host_id = NULL; 163 char *host_id = NULL;
165 userpref_device_record_get_host_id(dev->udid, &host_id); 164 config_device_record_get_host_id(dev->udid, &host_id);
166 lerr = lockdownd_start_session(lockdown, host_id, NULL, NULL); 165 lerr = lockdownd_start_session(lockdown, host_id, NULL, NULL);
167 free(host_id); 166 free(host_id);
168 if (lerr == LOCKDOWN_E_SUCCESS) { 167 if (lerr == LOCKDOWN_E_SUCCESS) {
@@ -179,7 +178,7 @@ retry:
179 break; 178 break;
180 case LOCKDOWN_E_SSL_ERROR: 179 case LOCKDOWN_E_SSL_ERROR:
181 usbmuxd_log(LL_ERROR, "%s: The stored pair record for device %s is invalid. Removing.", __func__, _dev->udid); 180 usbmuxd_log(LL_ERROR, "%s: The stored pair record for device %s is invalid. Removing.", __func__, _dev->udid);
182 if (userpref_remove_device_record(_dev->udid) == 0) { 181 if (config_remove_device_record(_dev->udid) == 0) {
183 lockdownd_client_free(lockdown); 182 lockdownd_client_free(lockdown);
184 lockdown = NULL; 183 lockdown = NULL;
185 goto retry; 184 goto retry;
@@ -293,7 +292,7 @@ retry:
293 } 292 }
294 293
295 host_id = NULL; 294 host_id = NULL;
296 userpref_device_record_get_host_id(dev->udid, &host_id); 295 config_device_record_get_host_id(dev->udid, &host_id);
297 lerr = lockdownd_start_session(lockdown, host_id, NULL, NULL); 296 lerr = lockdownd_start_session(lockdown, host_id, NULL, NULL);
298 free(host_id); 297 free(host_id);
299 if (lerr != LOCKDOWN_E_SUCCESS) { 298 if (lerr != LOCKDOWN_E_SUCCESS) {