ei: two more bug log messages

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer 2021-08-09 18:47:07 +10:00
parent ecd75fcf40
commit cb4dcaa078

View file

@ -128,15 +128,21 @@ _public_ void
ei_seat_drop_capability(struct ei_seat *seat,
enum ei_device_capability cap)
{
if (seat->state == EI_SEAT_STATE_NEW)
flag_clear(seat->capabilities_mask, cap);
if (seat->state != EI_SEAT_STATE_NEW) {
log_bug_client(ei_seat_get_context(seat), "Seat is already bound\n");
return;
}
flag_clear(seat->capabilities_mask, cap);
}
_public_ void
ei_seat_bind(struct ei_seat *seat)
{
if (seat->state != EI_SEAT_STATE_NEW)
if (seat->state != EI_SEAT_STATE_NEW) {
log_bug_client(ei_seat_get_context(seat), "Seat is already bound\n");
return;
}
ei_send_seat_bind(seat, seat->capabilities & seat->capabilities_mask);
seat->state = EI_SEAT_STATE_BOUND;