From e3f2d6070de7125058c343ef63961c27bc991bb6 Mon Sep 17 00:00:00 2001 From: Nikias Bassen Date: Sat, 7 Jun 2025 12:09:24 +0200 Subject: Add new idevice_get_device_version() to interface This allows getting a numerical representation of the device's ProductVersion string for easier version range checks --- src/lockdown.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/lockdown.c') diff --git a/src/lockdown.c b/src/lockdown.c index 411136c..a1ad67b 100644 --- a/src/lockdown.c +++ b/src/lockdown.c @@ -659,7 +659,7 @@ lockdownd_error_t lockdownd_client_new(idevice_t device, lockdownd_client_t *cli char *s_version = NULL; plist_get_string_val(p_version, &s_version); if (s_version && sscanf(s_version, "%d.%d.%d", &vers[0], &vers[1], &vers[2]) >= 2) { - device->version = DEVICE_VERSION(vers[0], vers[1], vers[2]); + device->version = IDEVICE_DEVICE_VERSION(vers[0], vers[1], vers[2]); } free(s_version); } @@ -733,7 +733,7 @@ lockdownd_error_t lockdownd_client_new_with_handshake(idevice_t device, lockdown plist_free(pair_record); pair_record = NULL; - if (device->version < DEVICE_VERSION(7,0,0) && device->device_class != DEVICE_CLASS_WATCH) { + if (device->version < IDEVICE_DEVICE_VERSION(7,0,0) && device->device_class != DEVICE_CLASS_WATCH) { /* for older devices, we need to validate pairing to receive trusted host status */ ret = lockdownd_validate_pair(client_loc, NULL); -- cgit v1.1-32-gdbae