From 18811d92c940018aeb3916780960d8f085eb9f32 Mon Sep 17 00:00:00 2001 From: Jay Freeman (saurik) Date: Wed, 27 Jul 2016 02:46:47 -0700 Subject: userpref: Remove obsoleted function userpref_has_pair_record() Since pair records are meanwhile handled by usbmuxd there is no need to check for the existence of a pair record on disk. Asking usbmuxd for a pair record of a given UDID is sufficient to know if it exists or not. --- common/userpref.c | 29 ----------------------------- 1 file changed, 29 deletions(-) (limited to 'common/userpref.c') diff --git a/common/userpref.c b/common/userpref.c index f88a123..d22c7f5 100644 --- a/common/userpref.c +++ b/common/userpref.c @@ -191,35 +191,6 @@ int userpref_read_system_buid(char **system_buid) return res; } -/** - * Determines whether this device has been connected to this system before. - * - * @param udid The device UDID as given by the device. - * - * @return 1 if the device has been connected previously to this configuration - * or 0 otherwise. - */ -int userpref_has_pair_record(const char *udid) -{ - int ret = 0; - const char *config_path = NULL; - char *config_file = NULL; - struct stat st; - - if (!udid) return 0; - - /* first get config file */ - config_path = userpref_get_config_dir(); - config_file = string_concat(config_path, DIR_SEP_S, udid, USERPREF_CONFIG_EXTENSION, NULL); - - if ((stat(config_file, &st) == 0) && S_ISREG(st.st_mode)) - ret = 1; - - free(config_file); - - return ret; -} - /** * Fills a list with UDIDs of devices that have been connected to this * system before, i.e. for which a public key file exists. -- cgit v1.1-32-gdbae