summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Simon Søndergaard2019-09-18 10:26:48 +0200
committerGravatar Nikias Bassen2021-06-22 10:53:12 +0200
commit7eb35833ac16d02b9f6609567d856aa932b99338 (patch)
tree99fd64301b8fbd17d9066a52e84c24223f8ef968
parentca324155f8b33babf907704828c7903608db0aa2 (diff)
downloadlibimobiledevice-7eb35833ac16d02b9f6609567d856aa932b99338.tar.gz
libimobiledevice-7eb35833ac16d02b9f6609567d856aa932b99338.tar.bz2
installation_proxy: Ignore non-status messages instead of terminating loop
Some iOS versions will interleave a CFBundleIdentifier message into the Status messages, and the code would treat the CFBundleIdentifier message as an error. Terminating the loop, never seeing the last message - and even worse - never calling back to ideviceinstaller that would be stuck waiting for a callback with a message where Status == Complete.
-rw-r--r--src/installation_proxy.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/installation_proxy.c b/src/installation_proxy.c
index 9a6f1ab..ebf2d03 100644
--- a/src/installation_proxy.c
+++ b/src/installation_proxy.c
@@ -367,17 +367,14 @@ static instproxy_error_t instproxy_receive_status_loop(instproxy_client_t client
367 /* check status from response */ 367 /* check status from response */
368 instproxy_status_get_name(node, &status_name); 368 instproxy_status_get_name(node, &status_name);
369 if (!status_name) { 369 if (!status_name) {
370 debug_info("failed to retrieve name from status response with error %d.", res); 370 debug_info("ignoring message without Status key:");
371 complete = 1; 371 debug_plist(node);
372 } 372 } else {
373
374 if (status_name) {
375 if (!strcmp(status_name, "Complete")) { 373 if (!strcmp(status_name, "Complete")) {
376 complete = 1; 374 complete = 1;
377 } else { 375 } else {
378 res = INSTPROXY_E_OP_IN_PROGRESS; 376 res = INSTPROXY_E_OP_IN_PROGRESS;
379 } 377 }
380
381#ifndef STRIP_DEBUG_CODE 378#ifndef STRIP_DEBUG_CODE
382 percent_complete = -1; 379 percent_complete = -1;
383 instproxy_status_get_percent_complete(node, &percent_complete); 380 instproxy_status_get_percent_complete(node, &percent_complete);