summaryrefslogtreecommitdiffstats
path: root/input/server.c
diff options
context:
space:
mode:
authorClaudio Takahasi <claudio.takahasi@openbossa.org>2007-06-23 19:25:46 +0000
committerClaudio Takahasi <claudio.takahasi@openbossa.org>2007-06-23 19:25:46 +0000
commitcdfb78757572a7726711489371c77604d06f3b44 (patch)
tree5816944490835e5f3553e98936ef4adc660dbb29 /input/server.c
parent32274fc77d459ab72868d15bf1f65f8fa74c6013 (diff)
input: send unplug virtual cable to unknown devices
Diffstat (limited to 'input/server.c')
-rw-r--r--input/server.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/input/server.c b/input/server.c
index c8e171f1..394fada3 100644
--- a/input/server.c
+++ b/input/server.c
@@ -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;
}