Added BlueZ build scripts
[ti-bt/build-utils.git] / patches / 0001-Enable-auto-reconnection.patch
1 From d621729a4659e42fe92f528c170797168e788183 Mon Sep 17 00:00:00 2001\r
2 From: Chen Ganir <chen.ganir@ti.com>\r
3 Date: Wed, 7 Nov 2012 10:33:21 +0200\r
4 Subject: [PATCH] Enable auto-reconnection\r
5 \r
6 Enable auto-reconnection for proximity, heartrate and thermometer\r
7 ---\r
8  profiles/heartrate/heartrate.c     |    2 ++\r
9  profiles/proximity/monitor.c       |    2 ++\r
10  profiles/thermometer/thermometer.c |    3 +++\r
11  3 files changed, 7 insertions(+)\r
12 \r
13 diff --git a/profiles/heartrate/heartrate.c b/profiles/heartrate/heartrate.c\r
14 index f0eb7a4..01c254c 100644\r
15 --- a/profiles/heartrate/heartrate.c\r
16 +++ b/profiles/heartrate/heartrate.c\r
17 @@ -800,6 +800,8 @@ int heartrate_device_register(struct btd_device *device,\r
18         hr->attioid = btd_device_add_attio_callback(device, attio_connected_cb,\r
19                                                 attio_disconnected_cb, hr);\r
20  \r
21 +        device_set_auto_connect(device, TRUE);\r
22 +\r
23         return 0;\r
24  }\r
25  \r
26 diff --git a/profiles/proximity/monitor.c b/profiles/proximity/monitor.c\r
27 index 1a14265..e45fa4a 100644\r
28 --- a/profiles/proximity/monitor.c\r
29 +++ b/profiles/proximity/monitor.c\r
30 @@ -652,6 +652,8 @@ int monitor_register(struct btd_device *device,\r
31                                                         attio_disconnected_cb,\r
32                                                         monitor);\r
33  \r
34 +       device_set_auto_connect(device, TRUE);\r
35 +\r
36         return 0;\r
37  }\r
38  \r
39 diff --git a/profiles/thermometer/thermometer.c b/profiles/thermometer/thermometer.c\r
40 index 4d1df1d..041e18f 100644\r
41 --- a/profiles/thermometer/thermometer.c\r
42 +++ b/profiles/thermometer/thermometer.c\r
43 @@ -1255,6 +1255,9 @@ int thermometer_register(struct btd_device *device, struct gatt_primary *tattr)\r
44  \r
45         t->attioid = btd_device_add_attio_callback(device, attio_connected_cb,\r
46                                                 attio_disconnected_cb, t);\r
47 +\r
48 +        device_set_auto_connect(device, TRUE);\r
49 +\r
50         return 0;\r
51  }\r
52  \r
53 -- \r
54 1.7.9.5\r
55 \r