diff options
| -rw-r--r-- | common/userpref.c | 29 |
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 | */ | ||
| 202 | int 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 | * |
