summaryrefslogtreecommitdiffstats
path: root/tools/idevicebackup2.c
diff options
context:
space:
mode:
authorGravatar Martin Szulecki2011-04-27 14:58:45 +0200
committerGravatar Martin Szulecki2011-04-27 14:58:45 +0200
commit88a5b03233ad95a0ccb3449a656f637ccde453ce (patch)
tree253db1c1d8c63534be0cbccf21da9858dd131518 /tools/idevicebackup2.c
parentcaca63af9b0e78eb302ec290b7cbebed7afb2589 (diff)
downloadlibimobiledevice-88a5b03233ad95a0ccb3449a656f637ccde453ce.tar.gz
libimobiledevice-88a5b03233ad95a0ccb3449a656f637ccde453ce.tar.bz2
mobilebackup2: Finish mobilebackup2_version_exchange() and use it in idevicebackup2
Diffstat (limited to 'tools/idevicebackup2.c')
-rw-r--r--tools/idevicebackup2.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/idevicebackup2.c b/tools/idevicebackup2.c
index b9187e9..113180b 100644
--- a/tools/idevicebackup2.c
+++ b/tools/idevicebackup2.c
@@ -1231,13 +1231,17 @@ int main(int argc, char *argv[])
1231 mobilebackup2_client_new(phone, port, &mobilebackup2); 1231 mobilebackup2_client_new(phone, port, &mobilebackup2);
1232 1232
1233 /* send Hello message */ 1233 /* send Hello message */
1234 err = mobilebackup2_version_exchange(mobilebackup2); 1234 double local_versions[2] = {2.0, 2.1};
1235 double remote_version = 0.0;
1236 err = mobilebackup2_version_exchange(mobilebackup2, local_versions, 2, &remote_version);
1235 if (err != MOBILEBACKUP2_E_SUCCESS) { 1237 if (err != MOBILEBACKUP2_E_SUCCESS) {
1236 printf("Could not perform backup protocol version exchange, error code %d\n", err); 1238 printf("Could not perform backup protocol version exchange, error code %d\n", err);
1237 cmd = CMD_LEAVE; 1239 cmd = CMD_LEAVE;
1238 goto checkpoint; 1240 goto checkpoint;
1239 } 1241 }
1240 1242
1243 PRINT_VERBOSE(1, "Negotiated Protocol Version %.1f\n", remote_version);
1244
1241 /* check abort conditions */ 1245 /* check abort conditions */
1242 if (quit_flag > 0) { 1246 if (quit_flag > 0) {
1243 PRINT_VERBOSE(1, "Aborting as requested by user...\n"); 1247 PRINT_VERBOSE(1, "Aborting as requested by user...\n");