summaryrefslogtreecommitdiffstats
path: root/tools/idevicebackup.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/idevicebackup.c')
-rw-r--r--tools/idevicebackup.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/tools/idevicebackup.c b/tools/idevicebackup.c
index 42f020d..1759f50 100644
--- a/tools/idevicebackup.c
+++ b/tools/idevicebackup.c
@@ -598,15 +598,15 @@ static void do_post_notification(const char *notification)
598 } 598 }
599 } 599 }
600 600
601 lockdownd_start_service(client, NP_SERVICE_NAME, &service); 601 lockdownd_error_t ldret = lockdownd_start_service(client, NP_SERVICE_NAME, &service);
602 if (service && service->port) { 602 if (ldret == LOCKDOWN_E_SUCCESS) {
603 np_client_new(device, service, &np); 603 np_client_new(device, service, &np);
604 if (np) { 604 if (np) {
605 np_post_notification(np, notification); 605 np_post_notification(np, notification);
606 np_client_free(np); 606 np_client_free(np);
607 } 607 }
608 } else { 608 } else {
609 printf("Could not start %s\n", NP_SERVICE_NAME); 609 printf("Could not start %s: %s\n", NP_SERVICE_NAME, lockdownd_strerror(ldret));
610 } 610 }
611 611
612 if (service) { 612 if (service) {
@@ -826,7 +826,7 @@ int main(int argc, char *argv[])
826 }; 826 };
827 np_observe_notifications(np, noties); 827 np_observe_notifications(np, noties);
828 } else { 828 } else {
829 printf("ERROR: Could not start service %s.\n", NP_SERVICE_NAME); 829 printf("ERROR: Could not start service %s: %s\n", NP_SERVICE_NAME, lockdownd_strerror(ldret));
830 } 830 }
831 831
832 afc_client_t afc = NULL; 832 afc_client_t afc = NULL;
@@ -834,9 +834,11 @@ int main(int argc, char *argv[])
834 /* start AFC, we need this for the lock file */ 834 /* start AFC, we need this for the lock file */
835 service->port = 0; 835 service->port = 0;
836 service->ssl_enabled = 0; 836 service->ssl_enabled = 0;
837 ldret = lockdownd_start_service(client, "com.apple.afc", &service); 837 ldret = lockdownd_start_service(client, AFC_SERVICE_NAME, &service);
838 if ((ldret == LOCKDOWN_E_SUCCESS) && service->port) { 838 if ((ldret == LOCKDOWN_E_SUCCESS) && service->port) {
839 afc_client_new(device, service, &afc); 839 afc_client_new(device, service, &afc);
840 } else {
841 printf("ERROR: Could not start service %s: %s\n", AFC_SERVICE_NAME, lockdownd_strerror(ldret));
840 } 842 }
841 } 843 }
842 844
@@ -1588,7 +1590,7 @@ files_out:
1588 if (manifest_path) 1590 if (manifest_path)
1589 free(manifest_path); 1591 free(manifest_path);
1590 } else { 1592 } else {
1591 printf("ERROR: Could not start service %s.\n", MOBILEBACKUP_SERVICE_NAME); 1593 printf("ERROR: Could not start service %s: %s\n", MOBILEBACKUP_SERVICE_NAME, lockdownd_strerror(ldret));
1592 lockdownd_client_free(client); 1594 lockdownd_client_free(client);
1593 client = NULL; 1595 client = NULL;
1594 } 1596 }