mirror of
https://git.kernel.org/pub/scm/bluetooth/bluez.git
synced 2024-11-17 01:04:40 +08:00
input: send unplug virtual cable to unknown devices
This commit is contained in:
parent
32274fc77d
commit
cdfb787575
@ -171,6 +171,12 @@ static gboolean connect_event(GIOChannel *chan, GIOCondition cond, gpointer data
|
||||
debug("Incoming connection on PSM %d", psm);
|
||||
|
||||
if (input_device_set_channel(&src, &dst, psm, nsk) < 0) {
|
||||
/* Send unplug virtual cable to unknown devices */
|
||||
if (psm == L2CAP_PSM_HIDP_CTRL) {
|
||||
int err;
|
||||
unsigned char unplug = 0x15;
|
||||
err = write(nsk, &unplug, sizeof(unplug));
|
||||
}
|
||||
close(nsk);
|
||||
return TRUE;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user