mirror of
https://gitlab.freedesktop.org/libinput/libei.git
synced 2026-04-21 16:00:39 +02:00
eis: immediately disconnect a client without the ei_connection interface
No point going through the setup here, just disconnect immediately.
This commit is contained in:
parent
619b83220d
commit
a80b19bb2c
1 changed files with 8 additions and 7 deletions
|
|
@ -86,23 +86,24 @@ static int
|
|||
client_msg_done(struct eis_connection_setup *setup)
|
||||
{
|
||||
struct eis_client *client = eis_connection_setup_get_client(setup);
|
||||
int rc = -EPROTO;
|
||||
|
||||
if (setup->client_versions.ei_connection != 0) {
|
||||
eis_client_setup_done(client, setup->name, setup->is_sender, &setup->client_versions);
|
||||
rc = 0;
|
||||
}
|
||||
/* Required interfaces - immediate disconnection if missing */
|
||||
if (setup->client_versions.ei_connection == 0)
|
||||
return -EPROTO;
|
||||
|
||||
eis_client_setup_done(client, setup->name, setup->is_sender, &setup->client_versions);
|
||||
|
||||
client->connection = eis_connection_new(client);
|
||||
eis_connection_setup_event_connection(setup, eis_connection_get_id(client->connection),
|
||||
eis_connection_get_version(client->connection));
|
||||
eis_connection_setup_unref(setup);
|
||||
|
||||
client->setup = eis_connection_setup_unref(setup);
|
||||
|
||||
/* Force a ping/pong. This isn't necessary but it doesn't hurt much here
|
||||
* and it ensures that any client implementation doesn't have that part missing */
|
||||
eis_connection_ping(client->connection, pong, NULL);
|
||||
|
||||
return rc;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue