Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit f29f1a2a authored by Arve Hjønnevåg's avatar Arve Hjønnevåg Committed by Armelle Laine
Browse files

trusty-ut-ctrl: Allow stream mode

When using vsock in stream mode (or any other stream mode connection)
message boundaries are not preserved, so the original messages can get
both split and merged. The TEST_MESSAGE and TEST_TEXT messages don't
have a length field which makes it imposible to support every possible
message that can be sent over a channel that preserves message
boundaries. Since the current message header types don't contain any
printable character, we assume any of these characters in a message
payload means that two messages got merged, so we split them back up.
Additionally, if we receive a message that does not start with a valid
message header, we assume it is a continuation of the previous message.

Test: trusty-ut-ctrl -D VSOCK:2:1 com.android.libctest ^Z fg
Bug: 298705967
Change-Id: I0e470a23664268f86e4defd824c47be3479c8f25
parent 0de42845
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment