summaryrefslogtreecommitdiffstats
path: root/common/userpref.c
diff options
context:
space:
mode:
authorGravatar Jay Freeman (saurik)2016-07-27 02:46:47 -0700
committerGravatar Jay Freeman (saurik)2016-07-27 02:46:47 -0700
commit18811d92c940018aeb3916780960d8f085eb9f32 (patch)
tree760750e227bf7ce569b03b7fca844b69b71dcdc4 /common/userpref.c
parenta94c5c827a786844b56e8e36ddaed6239f32d86c (diff)
downloadlibimobiledevice-18811d92c940018aeb3916780960d8f085eb9f32.tar.gz
libimobiledevice-18811d92c940018aeb3916780960d8f085eb9f32.tar.bz2
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.
Diffstat (limited to 'common/userpref.c')
-rw-r--r--common/userpref.c29
1 files changed, 0 insertions, 29 deletions
diff --git a/common/userpref.c b/common/userpref.c
index f88a123..d22c7f5 100644
--- a/common/userpref.c
+++ b/common/userpref.c
@@ -192,35 +192,6 @@ int userpref_read_system_buid(char **system_buid)
192} 192}
193 193
194/** 194/**
195 * Determines whether this device has been connected to this system before.
196 *
197 * @param udid The device UDID as given by the device.
198 *
199 * @return 1 if the device has been connected previously to this configuration
200 * or 0 otherwise.
201 */
202int userpref_has_pair_record(const char *udid)
203{
204 int ret = 0;
205 const char *config_path = NULL;
206 char *config_file = NULL;
207 struct stat st;
208
209 if (!udid) return 0;
210
211 /* first get config file */
212 config_path = userpref_get_config_dir();
213 config_file = string_concat(config_path, DIR_SEP_S, udid, USERPREF_CONFIG_EXTENSION, NULL);
214
215 if ((stat(config_file, &st) == 0) && S_ISREG(st.st_mode))
216 ret = 1;
217
218 free(config_file);
219
220 return ret;
221}
222
223/**
224 * Fills a list with UDIDs of devices that have been connected to this 195 * Fills a list with UDIDs of devices that have been connected to this
225 * system before, i.e. for which a public key file exists. 196 * system before, i.e. for which a public key file exists.
226 * 197 *