Skip to content

eis: fix an error when the seat is removed twice

Peter Hutterer requested to merge whot/libei:wip/fix-seat-removal-warning into master

Previous sequence reproducible with the eis-demo-server and ei-demo-client:

  • ctrl+c the client
  • eis client dispatch fails with an rc < 0 due to the socket being closed
  • eis calls eis_client_disconnect() which calls eis_seat_removed()
    • that triggers an event for SEAT_UNBIND
    • seat is set to REMOVE
  • eis-demo-server gets the SEAT_UNBIND event and (correctly) calls eis_seat_remove() since it doesn't know the client is disconnected yet. That is due to the library unwinding the state transparently.

Fix this by splitting out the calls: eis_drop_seat() is the internally used one that sets it to a new state of REMOVED_INTERNALLY, and then eis_seat_remove merely updates the state.

Fixes #10 (closed)

Merge request reports

Loading