From 88a5b03233ad95a0ccb3449a656f637ccde453ce Mon Sep 17 00:00:00 2001 From: Martin Szulecki Date: Wed, 27 Apr 2011 14:58:45 +0200 Subject: mobilebackup2: Finish mobilebackup2_version_exchange() and use it in idevicebackup2 --- tools/idevicebackup2.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'tools') 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"); -- cgit v1.1-32-gdbae