libeis: warn if connecting a device without capabilities

This is always a bug - where the device doesn't have recognized capabilities,
it should be rejected. libeis does the right thing and converts the
eis_device_connect() to a _disconnect() call but it's still useful to warn the
caller.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer 2020-09-28 16:12:51 +10:00
parent 070bdd9668
commit 3fc94f03b5

View file

@ -297,6 +297,9 @@ eis_device_connect(struct eis_device *device)
return;
if (device->capabilities_mask == 0) {
struct eis_client *client = eis_device_get_client(device);
log_bug(eis_client_get_context(client),
"Connecting a device without capabilities\n");
eis_device_disconnect(device);
return;
}