diff options
| author | 2010-06-08 21:34:35 +0200 | |
|---|---|---|
| committer | 2010-06-08 21:34:35 +0200 | |
| commit | e4bbd0e7d65cc81ccf4ae5d6df6af8077ac70d18 (patch) | |
| tree | 39da2bb754cd4504c31a3ece26f4fae7b9c2d35a /tools/idevicebackup.c | |
| parent | a149d85cb86c4cd2c76edc56b8acc00512fe24e3 (diff) | |
| download | libimobiledevice-e4bbd0e7d65cc81ccf4ae5d6df6af8077ac70d18.tar.gz libimobiledevice-e4bbd0e7d65cc81ccf4ae5d6df6af8077ac70d18.tar.bz2 | |
Free lockdownd connection early for both backup and restore commands
Diffstat (limited to 'tools/idevicebackup.c')
| -rw-r--r-- | tools/idevicebackup.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/tools/idevicebackup.c b/tools/idevicebackup.c index 8f47433..6626020 100644 --- a/tools/idevicebackup.c +++ b/tools/idevicebackup.c | |||
| @@ -857,6 +857,12 @@ int main(int argc, char *argv[]) | |||
| 857 | } | 857 | } |
| 858 | } | 858 | } |
| 859 | 859 | ||
| 860 | /* close down the lockdown connection as it is no longer needed */ | ||
| 861 | if (client) { | ||
| 862 | lockdownd_client_free(client); | ||
| 863 | client = NULL; | ||
| 864 | } | ||
| 865 | |||
| 860 | mobilebackup_error_t err; | 866 | mobilebackup_error_t err; |
| 861 | 867 | ||
| 862 | /* Manifest.plist (backup manifest (backup state)) */ | 868 | /* Manifest.plist (backup manifest (backup state)) */ |
| @@ -896,12 +902,6 @@ int main(int argc, char *argv[]) | |||
| 896 | plist_free(info_plist); | 902 | plist_free(info_plist); |
| 897 | info_plist = NULL; | 903 | info_plist = NULL; |
| 898 | 904 | ||
| 899 | /* close down the lockdown connection as it is no longer needed */ | ||
| 900 | if (client) { | ||
| 901 | lockdownd_client_free(client); | ||
| 902 | client = NULL; | ||
| 903 | } | ||
| 904 | |||
| 905 | /* create Status.plist with failed status for now */ | 905 | /* create Status.plist with failed status for now */ |
| 906 | mobilebackup_write_status(backup_directory, 0); | 906 | mobilebackup_write_status(backup_directory, 0); |
| 907 | 907 | ||
| @@ -1288,8 +1288,6 @@ int main(int argc, char *argv[]) | |||
| 1288 | printf("ERROR: Could not send BackupMessageRestoreComplete, error code %d\n", err); | 1288 | printf("ERROR: Could not send BackupMessageRestoreComplete, error code %d\n", err); |
| 1289 | } | 1289 | } |
| 1290 | /* TODO: close down notification_proxy connection */ | 1290 | /* TODO: close down notification_proxy connection */ |
| 1291 | /* close down lockdown connection as it is no longer needed */ | ||
| 1292 | lockdownd_client_free(client); | ||
| 1293 | client = NULL; | 1291 | client = NULL; |
| 1294 | break; | 1292 | break; |
| 1295 | case CMD_LEAVE: | 1293 | case CMD_LEAVE: |
