diff options
| -rw-r--r-- | src/libirecovery.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libirecovery.c b/src/libirecovery.c index 5b70c08..6741b95 100644 --- a/src/libirecovery.c +++ b/src/libirecovery.c | |||
| @@ -2868,6 +2868,12 @@ irecv_error_t irecv_send_buffer(irecv_client_t client, unsigned char* buffer, un | |||
| 2868 | } | 2868 | } |
| 2869 | } | 2869 | } |
| 2870 | 2870 | ||
| 2871 | if (recovery_mode && length % 512 == 0) { | ||
| 2872 | /* send a ZLP */ | ||
| 2873 | bytes = 0; | ||
| 2874 | irecv_usb_bulk_transfer(client, 0x04, buffer, 0, &bytes, USB_TIMEOUT); | ||
| 2875 | } | ||
| 2876 | |||
| 2871 | if (dfu_notify_finished && !recovery_mode) { | 2877 | if (dfu_notify_finished && !recovery_mode) { |
| 2872 | irecv_usb_control_transfer(client, 0x21, 1, packets, 0, (unsigned char*) buffer, 0, USB_TIMEOUT); | 2878 | irecv_usb_control_transfer(client, 0x21, 1, packets, 0, (unsigned char*) buffer, 0, USB_TIMEOUT); |
| 2873 | 2879 | ||
