Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
iiod-responder: Handle BINARY command in binary mode
Unlike with the network and USB backends, IIOD is unable to detect when a client disconnected. A new client would then send the BINARY command, which would not be understood by IIOD if it already was in binary mode. Use the convenient fact that the BINARY string is exactly the same size as our command opcodes, and compare each opcode read with the "BINARY\r\n" string. In case of a match, simply send a code 0 to tell the client that we are in binary mode, and continue as usual. Signed-off-by: Paul Cercueil <paul@crapouillou.net>
- Loading branch information