diff options
author | Dave Airlie <airlied@redhat.com> | 2014-11-04 13:12:31 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2014-11-04 13:12:31 +1000 |
commit | fba2c4827864b074c82f275ad39d437217af4c41 (patch) | |
tree | 2aaca656d623406137e6357408fd7fb008e9abf9 | |
parent | 8cf7fe28f26d3508637fc7c9d0fdb9ae97683cc5 (diff) |
don't wait for packets
-rw-r--r-- | dl3.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -464,6 +464,7 @@ static int send_buffer(libusb_device_handle *handle, int endpoint_out, int endpo { unsigned char buf[1024]; int r; + int count; int size; int len2, len; gcry_sexp_t km, result; @@ -539,11 +540,15 @@ static int send_buffer(libusb_device_handle *handle, int endpoint_out, int endpo if (r != 0) goto out; + count = 4; /* ack, send_Rrx, send_h_prime, send_pairing */ do { r = block_read_usb(handle, endpoint_in, buf, &size); if (r < 0) break; + count--; decode_rx(&info, buf, size); + if (count == 0) + break; /* find H' */ } while (1); |