mirror of
https://gitlab.freedesktop.org/libinput/libei.git
synced 2025-12-29 16:00:09 +01:00
If a receiver client stops calling ei_dispatch for a while eventually
we fill up the send buffer, causing messages to be quietly dropped.
When the client resumes the message stream resumes with whatever we send
next but that can leave the client in an inconsistent state.
deskflow hit this in the server-side where our event sequence of pointer
motion+frames eventually filled up the buffer, causing
eis_device_stop_emulating() to be silently dropped. On the next
InputCapture sequence eis_device_start_emulating() was sent to an
already emulating client (as seen by the client).
This patch adds a secondary queue, if we fail to send a message with
EAGAIN queue it up and flush that queue whenever the next message is
sent. Meanwhile any newly added messages go straight into that queue.
The caveat here: a nonresponding client will eventually trigger OOM,
there is no upper limit on the messages yet
This is the libeis version of
commit
|
||
|---|---|---|
| .. | ||
| templates | ||
| buildtest.c | ||
| buildtest.cc | ||
| conftest.py | ||
| eierpecken.c | ||
| eierpecken.h | ||
| eiproto.py.tmpl | ||
| meson.build | ||
| test-ei-device.c | ||
| test-ei-seat.c | ||
| test-ei.c | ||
| test-eis.c | ||
| test-main.c | ||
| test_oeffis.py | ||
| test_protocol.py | ||
| test_scanner.py | ||
| unit-tests.c | ||