diff options
| author | 2010-05-20 14:23:54 -0400 | |
|---|---|---|
| committer | 2010-05-20 14:23:54 -0400 | |
| commit | c4477844178978ef36a607a911712ed4c9c6904a (patch) | |
| tree | a26e9a4bff3e8bd4a769d100fe1ed81b38017a02 /src | |
| parent | fdbdb9f9e964528d08038e51cd57f9545cef294a (diff) | |
| download | libirecovery-c4477844178978ef36a607a911712ed4c9c6904a.tar.gz libirecovery-c4477844178978ef36a607a911712ed4c9c6904a.tar.bz2 | |
A few minor changes so pod2g will quit yelling at me
Diffstat (limited to 'src')
| -rw-r--r-- | src/libirecovery.c | 9 |
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 | |||
| 332 | unsigned int status = 0; | 332 | unsigned int status = 0; |
| 333 | for (i = 0; i < packets; i++) { | 333 | for (i = 0; i < packets; i++) { |
| 334 | int size = i + 1 < packets ? 0x800 : last; | 334 | int size = i + 1 < packets ? 0x800 : last; |
| 335 | int bytes = libusb_control_transfer(device->handle, 0x21, 1, i, 0, &buffer[i * 0x800], size, 1000); | 335 | int bytes = libusb_control_transfer(device->handle, 0x21, 1, 0, 0, &buffer[i * 0x800], size, 1000); |
| 336 | if (bytes != size) { | 336 | if (bytes != size) { |
| 337 | return IRECV_ERROR_USB_UPLOAD; | 337 | return IRECV_ERROR_USB_UPLOAD; |
| 338 | } | 338 | } |
| @@ -350,10 +350,7 @@ irecv_error_t irecv_send_buffer(irecv_device_t* device, unsigned char* buffer, u | |||
| 350 | 350 | ||
| 351 | } | 351 | } |
| 352 | 352 | ||
| 353 | //char command[0x100]; | 353 | libusb_control_transfer(device->handle, 0x21, 1, 0, 0, buffer, 0, 1000); |
| 354 | //memset(command, '\0', 0x100); | ||
| 355 | //snprintf(command, 0x100, "setenv filesize %d", length); | ||
| 356 | libusb_control_transfer(device->handle, 0x21, 1, i, 0, buffer, 0, 1000); | ||
| 357 | for (i = 0; i < 3; i++) { | 354 | for (i = 0; i < 3; i++) { |
| 358 | error = irecv_get_status(device, &status); | 355 | error = irecv_get_status(device, &status); |
| 359 | if(error != IRECV_SUCCESS) { | 356 | if(error != IRECV_SUCCESS) { |
| @@ -361,8 +358,6 @@ irecv_error_t irecv_send_buffer(irecv_device_t* device, unsigned char* buffer, u | |||
| 361 | } | 358 | } |
| 362 | } | 359 | } |
| 363 | 360 | ||
| 364 | //irecv_send_command(device, command); | ||
| 365 | |||
| 366 | return IRECV_SUCCESS; | 361 | return IRECV_SUCCESS; |
| 367 | } | 362 | } |
| 368 | 363 | ||
