From 6c7b50355cc5de1da1d7677e012f18efbce34237 Mon Sep 17 00:00:00 2001 From: Nikias Bassen Date: Thu, 29 Jul 2021 03:36:29 +0200 Subject: lockdown: Get DeviceClass to make sure OS version dependent code is executed correctly The code in lockdownd_client_new_with_handshake would call the function lockdownd_validate_pair based on the OS version being less than 7.0 without taking into account that Watch OS has a different versioning scheme compared to the other device classes. For this and any future version/device specific checks, the code now queries the DeviceClass and stores it in the idevice_private struct. --- src/idevice.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/idevice.c') diff --git a/src/idevice.c b/src/idevice.c index 08a8b31..9d20709 100644 --- a/src/idevice.c +++ b/src/idevice.c @@ -363,6 +363,7 @@ static idevice_t idevice_from_mux_device(usbmuxd_device_info_t *muxdev) device->udid = strdup(muxdev->udid); device->mux_id = muxdev->handle; device->version = 0; + device->device_class = 0; switch (muxdev->conn_type) { case CONNECTION_TYPE_USB: device->conn_type = CONNECTION_USBMUXD; -- cgit v1.1-32-gdbae