summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Martin Szulecki2012-07-04 21:29:22 +0200
committerGravatar Nikias Bassen2012-07-04 21:29:22 +0200
commita4d22e27c6fa5b78186804ba547e94b97b2925b4 (patch)
tree17249bb93cdc119fc910532853121d91179f8c75
parent6ee1b3988fe1fe193a18b2957e05c3952482eb40 (diff)
downloadlibirecovery-a4d22e27c6fa5b78186804ba547e94b97b2925b4.tar.gz
libirecovery-a4d22e27c6fa5b78186804ba547e94b97b2925b4.tar.bz2
Only send another ZLP if requested or regular uploads are broken
-rw-r--r--libirecovery.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libirecovery.c b/libirecovery.c
index 6be2319..f92cc50 100644
--- a/libirecovery.c
+++ b/libirecovery.c
@@ -1023,8 +1023,10 @@ irecv_error_t irecv_send_buffer(irecv_client_t client, unsigned char* buffer, un
}
}
- // we send a pseudo ZLP here just in case
- irecv_control_transfer(client, 0x21, 1, 0, 0, 0, 0, USB_TIMEOUT);
+ if (dfuNotifyFinished == 2) {
+ // we send a pseudo ZLP here just in case
+ irecv_control_transfer(client, 0x21, 1, 0, 0, 0, 0, USB_TIMEOUT);
+ }
irecv_reset(client);
}