diff options
| author | 2013-09-19 21:02:19 +0200 | |
|---|---|---|
| committer | 2013-09-19 21:02:19 +0200 | |
| commit | e62733a99c46ad2fb6887e578e7aca88404b11eb (patch) | |
| tree | d412b06638dfdc511cc341582bedca02419efb3d /src | |
| parent | 24eba192f52db96fb97caf5146cd36070cb26089 (diff) | |
| download | usbmuxd-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.c | 17 |
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) | |||
| 216 | } else { | 216 | } else { |
| 217 | /* iOS 6.x and earlier */ | 217 | /* iOS 6.x and earlier */ |
| 218 | lerr = lockdownd_pair(lockdown, NULL); | 218 | lerr = lockdownd_pair(lockdown, NULL); |
| 219 | if (lerr == LOCKDOWN_E_PASSWORD_PROTECTED) { | 219 | if (lerr != LOCKDOWN_E_SUCCESS) { |
| 220 | usbmuxd_log(LL_INFO, "%s: Device %s is locked with a passcode. Cannot pair.", __func__, _dev->udid); | 220 | if (lerr == LOCKDOWN_E_PASSWORD_PROTECTED) { |
| 221 | // TODO send notification to user's desktop | 221 | usbmuxd_log(LL_INFO, "%s: Device %s is locked with a passcode. Cannot pair.", __func__, _dev->udid); |
| 222 | goto leave; | 222 | /* TODO send notification to user's desktop */ |
| 223 | } else if (lerr != LOCKDOWN_E_SUCCESS) { | 223 | } else { |
| 224 | usbmuxd_log(LL_ERROR, "%s: ERROR: Pair failed for device %s, lockdown error %d", __func__, _dev->udid, lerr); | 224 | usbmuxd_log(LL_ERROR, "%s: ERROR: Pair failed for device %s, lockdown error %d", __func__, _dev->udid, lerr); |
| 225 | } | ||
| 226 | |||
| 227 | /* make device visible anyways */ | ||
| 228 | client_device_add(info); | ||
| 229 | |||
| 225 | goto leave; | 230 | goto leave; |
| 226 | } | 231 | } |
| 227 | 232 | ||
