diff options
author | Nikias Bassen | 2012-07-04 23:11:44 +0200 |
---|---|---|
committer | Nikias Bassen | 2012-07-04 23:11:44 +0200 |
commit | 1b4cfb7746eac259d2b555d3abcb20069c9d9834 (patch) | |
tree | 4817fca17f9e981a884859c4e5bb00a261e6efd5 /libirecovery.c | |
parent | 5e6ffc082b2997ab27892d531e1bf7757f6342d6 (diff) | |
download | libirecovery-1b4cfb7746eac259d2b555d3abcb20069c9d9834.tar.gz libirecovery-1b4cfb7746eac259d2b555d3abcb20069c9d9834.tar.bz2 |
irecv_receive: increase timeout and don't break if bytes < BUFFER_SIZE
Diffstat (limited to 'libirecovery.c')
-rw-r--r-- | libirecovery.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/libirecovery.c b/libirecovery.c index 745b080..4419b50 100644 --- a/libirecovery.c +++ b/libirecovery.c @@ -1059,7 +1059,7 @@ irecv_error_t irecv_receive(irecv_client_t client) { if (check_context(client) != IRECV_E_SUCCESS) return IRECV_E_NO_DEVICE; int bytes = 0; - while (irecv_bulk_transfer(client, 0x81, (unsigned char*) buffer, BUFFER_SIZE, &bytes, 500) == 0) { + while (irecv_bulk_transfer(client, 0x81, (unsigned char*) buffer, BUFFER_SIZE, &bytes, 1000) == 0) { if (bytes > 0) { if (client->received_callback != NULL) { irecv_event_t event; @@ -1070,7 +1070,6 @@ irecv_error_t irecv_receive(irecv_client_t client) { return IRECV_E_SUCCESS; } } - if (bytes < BUFFER_SIZE) break; } else break; } |