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[])
mobilebackup2_client_new(phone, port, &mobilebackup2);
/* send Hello message */
- err = mobilebackup2_version_exchange(mobilebackup2);
+ double local_versions[2] = {2.0, 2.1};
+ double remote_version = 0.0;
+ err = mobilebackup2_version_exchange(mobilebackup2, local_versions, 2, &remote_version);
if (err != MOBILEBACKUP2_E_SUCCESS) {
printf("Could not perform backup protocol version exchange, error code %d\n", err);
cmd = CMD_LEAVE;
goto checkpoint;
}
+ PRINT_VERBOSE(1, "Negotiated Protocol Version %.1f\n", remote_version);
+
/* check abort conditions */
if (quit_flag > 0) {
PRINT_VERBOSE(1, "Aborting as requested by user...\n");