Commit fcfd3d7f authored by Peter Stuge's avatar Peter Stuge
Browse files

Return an error on commands where the device sends us a '-' response

This happens e.g. when the checksum is incorrect, but not for much else.
parent ea3c905d
......@@ -158,7 +158,8 @@ static int checksum_and_send(libusb_device_handle *handle, size_t idx)
if (retval)
return retval;
/* FIXME: validate transfered here? */
if (transfered != 1 || buf.c[0] != '+')
/* wait for command response */
retval = wait_response(handle, &transfered);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment