summaryrefslogtreecommitdiffstats
path: root/src/ifuse.c
diff options
context:
space:
mode:
authorGravatar Martin Szulecki2010-01-13 03:24:49 +0100
committerGravatar Martin Szulecki2010-01-13 03:24:49 +0100
commit267f8d0aa6d33394ec8c53e24ad7ffeb35288cf3 (patch)
treea3f271b90ffcfb05b869a728db31ee99b5c3d44c /src/ifuse.c
parent9eb4cc0593b20a84887753785041d17fec64b375 (diff)
downloadifuse-267f8d0aa6d33394ec8c53e24ad7ffeb35288cf3.tar.gz
ifuse-267f8d0aa6d33394ec8c53e24ad7ffeb35288cf3.tar.bz2
Notify user if startup fails due to the device having a password set
Diffstat (limited to 'src/ifuse.c')
-rw-r--r--src/ifuse.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/ifuse.c b/src/ifuse.c
index 6243e3f..949ae38 100644
--- a/src/ifuse.c
+++ b/src/ifuse.c
@@ -664,6 +664,7 @@ int main(int argc, char *argv[])
char **ammended_argv;
struct fuse_args args = FUSE_ARGS_INIT(argc, argv);
struct stat mst;
+ lockdownd_error_t ret = LOCKDOWN_E_SUCCESS;
memset(&opts, 0, sizeof(opts));
@@ -698,11 +699,18 @@ int main(int argc, char *argv[])
fprintf(stderr, "If you're still having issues try unplugging the device and reconnecting it.\n");
return 0;
}
-
- if (LOCKDOWN_E_SUCCESS != lockdownd_client_new_with_handshake(phone, &control, "ifuse")) {
+
+ ret = lockdownd_client_new_with_handshake(phone, &control, "ifuse");
+ if (ret != LOCKDOWN_E_SUCCESS) {
iphone_device_free(phone);
- fprintf(stderr, "Failed to connect to lockdownd service on the device.\n");
- fprintf(stderr, "Try again. If it still fails try rebooting your device.\n");
+ if (ret == LOCKDOWN_E_PASSWORD_PROTECTED) {
+ fprintf(stderr, "Please disable the password protection on your device and try again.\n");
+ fprintf(stderr, "The device does not allow pairing as long as a password has been set.\n");
+ fprintf(stderr, "You can enable it again after the connection succeeded.\n");
+ } else {
+ fprintf(stderr, "Failed to connect to lockdownd service on the device.\n");
+ fprintf(stderr, "Try again. If it still fails try rebooting your device.\n");
+ }
return 0;
}