diff options
| author | Johan Hedberg <johan.hedberg@nokia.com> | 2009-02-23 10:34:16 +0200 | 
|---|---|---|
| committer | Johan Hedberg <johan.hedberg@nokia.com> | 2009-02-23 10:34:16 +0200 | 
| commit | 5285b3f4bf029f86b2e22c24428fa92315267897 (patch) | |
| tree | ee56e098a8331959740cb77c98034329ecef9d93 /input/server.c | |
| parent | f36aa56e0c6a3c780e97a9f9bdc84a97b8406322 (diff) | |
Input plugin fixes and cleanup
This patch fixes all known issues caused by converting the input plugin
to use BtIO.
Diffstat (limited to 'input/server.c')
| -rw-r--r-- | input/server.c | 7 | 
1 files changed, 2 insertions, 5 deletions
| diff --git a/input/server.c b/input/server.c index 6d08804b..041f302c 100644 --- a/input/server.c +++ b/input/server.c @@ -89,7 +89,6 @@ static int authorize_device(const bdaddr_t *src, const bdaddr_t *dst)  static void connect_event_cb(GIOChannel *chan, GError *err, gpointer data)  { -	int sk;  	uint16_t psm;  	bdaddr_t src, dst;  	GError *gerr = NULL; @@ -113,13 +112,11 @@ static void connect_event_cb(GIOChannel *chan, GError *err, gpointer data)  	debug("Incoming connection on PSM %d", psm); -	sk = g_io_channel_unix_get_fd(chan); - -	if (input_device_set_channel(&src, &dst, psm, sk) < 0) { +	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 }; -			int err; +			int err, sk = g_io_channel_unix_get_fd(chan);  			err = write(sk, unplug, sizeof(unplug));  		}  		g_io_channel_shutdown(chan, TRUE, NULL); | 
