diff options
author | Nikias Bassen | 2013-12-13 04:35:44 +0100 |
---|---|---|
committer | Nikias Bassen | 2013-12-13 04:35:44 +0100 |
commit | c168c3c7746e51fef4ec748a3982553833bb0c4e (patch) | |
tree | 927567acde881f84bdd3b40caf7dd095952423ad /src/preflight.c | |
parent | 3537f78a98111b88aab5e2d94dda340cf09be5af (diff) | |
download | usbmuxd-c168c3c7746e51fef4ec748a3982553833bb0c4e.tar.gz usbmuxd-c168c3c7746e51fef4ec748a3982553833bb0c4e.tar.bz2 |
add support for reading and writing config and pair record files
Diffstat (limited to 'src/preflight.c')
-rw-r--r-- | src/preflight.c | 11 |
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 #include "preflight.h" #include "client.h" +#include "conf.h" #include "log.h" #ifdef HAVE_LIBIMOBILEDEVICE @@ -55,12 +56,10 @@ struct cb_data { int is_device_connected; }; -extern uint16_t userpref_remove_device_record(const char* udid); - static void lockdownd_set_untrusted_host_buid(lockdownd_client_t lockdown) { char* system_buid = NULL; - userpref_get_system_buid(&system_buid); + config_get_system_buid(&system_buid); usbmuxd_log(LL_DEBUG, "%s: Setting UntrustedHostBUID to %s", __func__, system_buid); lockdownd_set_value(lockdown, NULL, "UntrustedHostBUID", plist_new_string(system_buid)); free(system_buid); @@ -162,7 +161,7 @@ retry: int is_device_paired = 0; char *host_id = NULL; - userpref_device_record_get_host_id(dev->udid, &host_id); + config_device_record_get_host_id(dev->udid, &host_id); lerr = lockdownd_start_session(lockdown, host_id, NULL, NULL); free(host_id); if (lerr == LOCKDOWN_E_SUCCESS) { @@ -179,7 +178,7 @@ retry: break; case LOCKDOWN_E_SSL_ERROR: usbmuxd_log(LL_ERROR, "%s: The stored pair record for device %s is invalid. Removing.", __func__, _dev->udid); - if (userpref_remove_device_record(_dev->udid) == 0) { + if (config_remove_device_record(_dev->udid) == 0) { lockdownd_client_free(lockdown); lockdown = NULL; goto retry; @@ -293,7 +292,7 @@ retry: } host_id = NULL; - userpref_device_record_get_host_id(dev->udid, &host_id); + config_device_record_get_host_id(dev->udid, &host_id); lerr = lockdownd_start_session(lockdown, host_id, NULL, NULL); free(host_id); if (lerr != LOCKDOWN_E_SUCCESS) { |