diff options
| author | 2018-09-29 22:59:25 +0200 | |
|---|---|---|
| committer | 2018-09-29 22:59:25 +0200 | |
| commit | f1ee0fd8b2b1dd65c64f5a67e208efc708295caa (patch) | |
| tree | a12c295d65fd88e5452aeff813daba83a493241b /common/userpref.c | |
| parent | 05fefa6aeff45fc84665e8427444295d8414df98 (diff) | |
| download | libimobiledevice-f1ee0fd8b2b1dd65c64f5a67e208efc708295caa.tar.gz libimobiledevice-f1ee0fd8b2b1dd65c64f5a67e208efc708295caa.tar.bz2 | |
lockdown: Pass along usbmux device id when saving pair records
Diffstat (limited to 'common/userpref.c')
| -rw-r--r-- | common/userpref.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/common/userpref.c b/common/userpref.c index be745cb..0fa5b96 100644 --- a/common/userpref.c +++ b/common/userpref.c | |||
| @@ -273,19 +273,20 @@ userpref_error_t userpref_get_paired_udids(char ***list, unsigned int *count) | |||
| 273 | * Save a pair record for a device. | 273 | * Save a pair record for a device. |
| 274 | * | 274 | * |
| 275 | * @param udid The device UDID as given by the device | 275 | * @param udid The device UDID as given by the device |
| 276 | * @param device_id The usbmux device id (handle) of the connected device, or 0 | ||
| 276 | * @param pair_record The pair record to save | 277 | * @param pair_record The pair record to save |
| 277 | * | 278 | * |
| 278 | * @return 1 on success and 0 if no device record is given or if it has already | 279 | * @return 1 on success and 0 if no device record is given or if it has already |
| 279 | * been saved previously. | 280 | * been saved previously. |
| 280 | */ | 281 | */ |
| 281 | userpref_error_t userpref_save_pair_record(const char *udid, plist_t pair_record) | 282 | userpref_error_t userpref_save_pair_record(const char *udid, uint32_t device_id, plist_t pair_record) |
| 282 | { | 283 | { |
| 283 | char* record_data = NULL; | 284 | char* record_data = NULL; |
| 284 | uint32_t record_size = 0; | 285 | uint32_t record_size = 0; |
| 285 | 286 | ||
| 286 | plist_to_bin(pair_record, &record_data, &record_size); | 287 | plist_to_bin(pair_record, &record_data, &record_size); |
| 287 | 288 | ||
| 288 | int res = usbmuxd_save_pair_record(udid, record_data, record_size); | 289 | int res = usbmuxd_save_pair_record_with_device_id(udid, device_id, record_data, record_size); |
| 289 | 290 | ||
| 290 | free(record_data); | 291 | free(record_data); |
| 291 | 292 | ||
