Skip to content
Snippets Groups Projects
Commit cedc49da authored by Wesley W. Terpstra's avatar Wesley W. Terpstra
Browse files

Tolerate a bitmask with multiple elements as per the specification.

parent 33dc7096
Branches
Tags
......@@ -172,18 +172,14 @@ int eb_device_slave(eb_socket_t socketp, eb_transport_t transportp, eb_device_t
dev->widths = buffer[3];
return 1;
return 0; /* don't poll again */
}
/* Not V1 ? */
if ((buffer[2] & 0xf0) != 0x10) goto kill;
/* Neither probe nor response, yet multiple widths? fail */
widths = buffer[3];
if (!eb_width_refined(widths)) goto kill;
/* Unsupported widths? fail */
widths &= socket->widths;
widths = eb_width_refine(buffer[3] & socket->widths);
if (!eb_width_possible(widths)) goto kill;
/* As a reply, this will contain no reads */
......
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