summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar Martin Szulecki2012-07-17 17:28:14 +0200
committerGravatar Nikias Bassen2012-07-17 17:28:14 +0200
commit17e12aea1dd797846f679a4f157c9d954b530874 (patch)
treef36db1fcedc2f24423aa070d332f7c3158e013ce /src
parent0a9fc08109d0c4fb58a3de6d855b38c5d0833289 (diff)
downloadidevicerestore-17e12aea1dd797846f679a4f157c9d954b530874.tar.gz
idevicerestore-17e12aea1dd797846f679a4f157c9d954b530874.tar.bz2
dfu: Send a ZLP after sending iBEC data possibly fixing some mode switch hangs
Diffstat (limited to 'src')
-rw-r--r--src/dfu.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/dfu.c b/src/dfu.c
index 13c715a..085485c 100644
--- a/src/dfu.c
+++ b/src/dfu.c
@@ -134,6 +134,7 @@ int dfu_send_component(struct idevicerestore_client_t* client, plist_t build_ide
char* path = NULL;
char* blob = NULL;
irecv_error_t error = 0;
+ int flag = 1;
if (client->tss) {
if (tss_get_entry_path(client->tss, component, &path) < 0) {
@@ -177,12 +178,13 @@ int dfu_send_component(struct idevicerestore_client_t* client, plist_t build_ide
free(data);
data = newdata;
size += fillsize;
+ flag = 2;
}
info("Sending %s (%d bytes)...\n", component, size);
// FIXME: Did I do this right????
- error = irecv_send_buffer(client->dfu->client, data, size, 1);
+ error = irecv_send_buffer(client->dfu->client, data, size, flag);
free(path);
if (error != IRECV_E_SUCCESS) {
error("ERROR: Unable to send %s component: %s\n", component, irecv_strerror(error));