diff --git a/src/libei.c b/src/libei.c index c5f60f7..7c8afd2 100644 --- a/src/libei.c +++ b/src/libei.c @@ -391,7 +391,7 @@ handle_msg_device_added(struct ei *ei, uint32_t deviceid, uint32_t seatid, * won't know which unless we keep some device ID table. Not worth * it, so just silently ignore */ if (ei_seat_find_device(seat, deviceid)) { - log_error(ei, "Server sent duplicate device id %d\n", deviceid); + log_error(ei, "Server sent duplicate device id %#x\n", deviceid); return -EINVAL; } diff --git a/src/libeis-seat.c b/src/libeis-seat.c index ca11c0e..f2e104d 100644 --- a/src/libeis-seat.c +++ b/src/libeis-seat.c @@ -64,10 +64,11 @@ eis_seat_get_client(struct eis_seat *seat) _public_ struct eis_seat * eis_client_new_seat(struct eis_client *client, const char *name) { - static uint32_t seatid = 0x10000; /* we leave the lower bits to the deviceids */ + static uint32_t seatid; struct eis_seat *seat = eis_seat_create(&client->object); - seat->id = seatid++; + /* we leave the lower bits to the deviceids */ + seat->id = ++seatid << 16; seat->state = EIS_SEAT_STATE_PENDING; seat->name = xstrdup(name); list_init(&seat->devices);