summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar Martin Szulecki2013-09-19 21:02:19 +0200
committerGravatar Martin Szulecki2013-09-19 21:02:19 +0200
commite62733a99c46ad2fb6887e578e7aca88404b11eb (patch)
treed412b06638dfdc511cc341582bedca02419efb3d /src
parent24eba192f52db96fb97caf5146cd36070cb26089 (diff)
downloadusbmuxd-e62733a99c46ad2fb6887e578e7aca88404b11eb.tar.gz
usbmuxd-e62733a99c46ad2fb6887e578e7aca88404b11eb.tar.bz2
preflight: Allow pre iOS 6 devices to become visible if pairing fails
This allows any client to react and handle pairing errors which includes password protected devices and alike.
Diffstat (limited to 'src')
-rw-r--r--src/preflight.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/preflight.c b/src/preflight.c
index 0582dd1..ec510ec 100644
--- a/src/preflight.c
+++ b/src/preflight.c
@@ -216,12 +216,17 @@ static void* preflight_worker_handle_device_add(void* userdata)
} else {
/* iOS 6.x and earlier */
lerr = lockdownd_pair(lockdown, NULL);
- if (lerr == LOCKDOWN_E_PASSWORD_PROTECTED) {
- usbmuxd_log(LL_INFO, "%s: Device %s is locked with a passcode. Cannot pair.", __func__, _dev->udid);
- // TODO send notification to user's desktop
- goto leave;
- } else if (lerr != LOCKDOWN_E_SUCCESS) {
- usbmuxd_log(LL_ERROR, "%s: ERROR: Pair failed for device %s, lockdown error %d", __func__, _dev->udid, lerr);
+ if (lerr != LOCKDOWN_E_SUCCESS) {
+ if (lerr == LOCKDOWN_E_PASSWORD_PROTECTED) {
+ usbmuxd_log(LL_INFO, "%s: Device %s is locked with a passcode. Cannot pair.", __func__, _dev->udid);
+ /* TODO send notification to user's desktop */
+ } else {
+ usbmuxd_log(LL_ERROR, "%s: ERROR: Pair failed for device %s, lockdown error %d", __func__, _dev->udid, lerr);
+ }
+
+ /* make device visible anyways */
+ client_device_add(info);
+
goto leave;
}