And add the tests for the list and string helpers as a first use-case, copied
from the libinput tests.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Re-ordering commands in buildtype=release means recvfd may not be set by the
time _cleanup_ is called (due to the goto outs). Replace those with return
statements, it's more logical here anyway.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Initial implementation only handled this correctly if the fds were over
multiple message headers, not multiple fds in the same message header.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
In case the RESUMED isn't written on the wire yet (or it's written with
sendmsg and thus a separate message on its own) we don't have the RESUMED
ready for us yet. Let's call another dispatch to make sure it's processed.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This is the proto parser and it'll know when we need an fd on the message, so
let's make sure we have everything in place to fetch the fd.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This is the proto parser and it'll know when we need an fd on the message, so
let's make sure we have everything in place to fetch the fd.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This was intentional here but valgrind doesn't like it, so let's just set it
to something that should look odd.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Building with a releaes build reshuffles things so this ends causing potential
issues. Initialize to NULL to avoid around this.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Mostly copied from libinput and simplified so we only test on Fedora for now.
Good enough that it should catch accidental breakages.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
The logger utilities are useful for quick prototyping, but we've reached the
point where we need the "proper" implementation of a log handler.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
The logger utilities are useful for quick prototyping, but we've reached the
point where we need the "proper" implementation of a log handler.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Make the default set an enum with an array to access the codes. Additionally
provide a true RBG escape sequence, all modern terminals support that anyway.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Where the server connects a device after the client has already removed it, we
need to ignore that message silently.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This was already spelled out in the documentation but just not yet
implemented. New starting state for any device added by EIS is "suspended",
the server needs to explicitly resume it before events are accepted.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>