summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/libirecovery.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/libirecovery.c b/src/libirecovery.c
index 18097ee..0be16c6 100644
--- a/src/libirecovery.c
+++ b/src/libirecovery.c
@@ -332,7 +332,7 @@ irecv_error_t irecv_send_buffer(irecv_device_t* device, unsigned char* buffer, u
unsigned int status = 0;
for (i = 0; i < packets; i++) {
int size = i + 1 < packets ? 0x800 : last;
- int bytes = libusb_control_transfer(device->handle, 0x21, 1, i, 0, &buffer[i * 0x800], size, 1000);
+ int bytes = libusb_control_transfer(device->handle, 0x21, 1, 0, 0, &buffer[i * 0x800], size, 1000);
if (bytes != size) {
return IRECV_ERROR_USB_UPLOAD;
}
@@ -350,10 +350,7 @@ irecv_error_t irecv_send_buffer(irecv_device_t* device, unsigned char* buffer, u
}
- //char command[0x100];
- //memset(command, '\0', 0x100);
- //snprintf(command, 0x100, "setenv filesize %d", length);
- libusb_control_transfer(device->handle, 0x21, 1, i, 0, buffer, 0, 1000);
+ libusb_control_transfer(device->handle, 0x21, 1, 0, 0, buffer, 0, 1000);
for (i = 0; i < 3; i++) {
error = irecv_get_status(device, &status);
if(error != IRECV_SUCCESS) {
@@ -361,8 +358,6 @@ irecv_error_t irecv_send_buffer(irecv_device_t* device, unsigned char* buffer, u
}
}
- //irecv_send_command(device, command);
-
return IRECV_SUCCESS;
}