From 8a706acad288850f22e322cdcb62c2f585d9910d Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Mon, 23 Feb 2009 14:07:05 +0200 Subject: Fix virtual cable unplug sending --- input/server.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'input') diff --git a/input/server.c b/input/server.c index 1793e1ca..b20570b7 100644 --- a/input/server.c +++ b/input/server.c @@ -103,9 +103,9 @@ static void connect_event_cb(GIOChannel *chan, GError *err, gpointer data) if (input_device_set_channel(&src, &dst, psm, chan) < 0) { /* Send unplug virtual cable to unknown devices */ if (psm == L2CAP_PSM_HIDP_CTRL) { - unsigned char unplug[] = { 0x15 }; + unsigned char unplug = 0x15; int err, sk = g_io_channel_unix_get_fd(chan); - err = write(sk, unplug, sizeof(unplug)); + err = write(sk, &unplug, sizeof(unplug)); } g_io_channel_shutdown(chan, TRUE, NULL); return; -- cgit