summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2014-09-13 02:43:23 +0200
committerGravatar Nikias Bassen2014-09-13 02:43:23 +0200
commit516e126b1a703afc9c72a77f7d5ad7becff904a1 (patch)
treeb13e02ca5bad69aa143414b6a16e8a6722bd7d7a /tools
parent1af71817b934bff73a23794cb308606726b7b1ad (diff)
downloadlibimobiledevice-516e126b1a703afc9c72a77f7d5ad7becff904a1.tar.gz
libimobiledevice-516e126b1a703afc9c72a77f7d5ad7becff904a1.tar.bz2
idevicebackup2: Fix retry loop when device requests 0 files
Under certain circumstances a device could request an empty array of filenames to be transferred with DLMessageDownloadFiles. This was not handled correctly in idevicebackup2 by just doing nothing, resulting in a 'retry loop' waiting endlessly for new messages from the device. The solution is to send a termination packet and a success status response. Thanks to pondahai for reporting.
Diffstat (limited to 'tools')
-rw-r--r--tools/idevicebackup2.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/tools/idevicebackup2.c b/tools/idevicebackup2.c
index 2da4971..1047a38 100644
--- a/tools/idevicebackup2.c
+++ b/tools/idevicebackup2.c
@@ -681,7 +681,6 @@ static void mb2_handle_send_files(mobilebackup2_client_t mobilebackup2, plist_t
plist_t files = plist_array_get_item(message, 1);
cnt = plist_array_get_size(files);
- if (cnt == 0) return;
for (i = 0; i < cnt; i++) {
plist_t val = plist_array_get_item(files, i);