/[gentoo-x86]/net-wireless/bluez/files/0002-autopair-Don-t-handle-the-iCade.patch
Gentoo

Contents of /net-wireless/bluez/files/0002-autopair-Don-t-handle-the-iCade.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Sun Feb 16 19:17:40 2014 UTC (5 months, 1 week ago) by pacho
Branch: MAIN
CVS Tags: HEAD
Apply some Fedora patches that also fix Logitech DiNovo Edge keyboard (#501120 by manwe)

(Portage version: 2.2.8-r1/cvs/Linux x86_64, signed Manifest commit with key A188FBD4)

1 From c16ae7041c7511d8d1ed8441f696716fa6a9117e Mon Sep 17 00:00:00 2001
2 From: Bastien Nocera <hadess@hadess.net>
3 Date: Tue, 19 Nov 2013 14:11:39 +0100
4 Subject: [PATCH 2/5] autopair: Don't handle the iCade
5
6 We can't easily enter digits other than 1 through 4 (inclusive)
7 so leave it up to the agent to figure out a good passcode
8 for the iCade.
9
10 Note that we can not use the VID/PID of the device, as it is not
11 yet known at that point.
12 ---
13 plugins/autopair.c | 12 +++++++++++-
14 1 file changed, 11 insertions(+), 1 deletion(-)
15
16 diff --git a/plugins/autopair.c b/plugins/autopair.c
17 index 8c98c12..5d2f6f7 100644
18 --- a/plugins/autopair.c
19 +++ b/plugins/autopair.c
20 @@ -57,13 +57,23 @@ static ssize_t autopair_pincb(struct btd_adapter *adapter,
21 {
22 char addr[18];
23 char pinstr[7];
24 + char name[25];
25 uint32_t class;
26
27 ba2str(device_get_address(device), addr);
28
29 class = btd_device_get_class(device);
30
31 - DBG("device %s 0x%x", addr, class);
32 + device_get_name(device, name, sizeof(name));
33 + name[sizeof(name) - 1] = 0;
34 +
35 + DBG("device %s (%s) 0x%x", addr, name, class);
36 +
37 + g_message ("vendor 0x%X product: 0x%X", btd_device_get_vendor (device), btd_device_get_product (device));
38 +
39 + /* The iCade shouldn't use random PINs like normal keyboards */
40 + if (name != NULL && strstr(name, "iCade") != NULL)
41 + return 0;
42
43 /* This is a class-based pincode guesser. Ignore devices with an
44 * unknown class.
45 --
46 1.8.4.2

  ViewVC Help
Powered by ViewVC 1.1.20