aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYong-iL Joh <yong-il.joh@windriver.com>2016-03-09 22:07:03 +0900
committerYong-iL Joh <yong-il.joh@windriver.com>2016-03-11 17:05:36 +0900
commitf80a3b9ade9a092f27ddcb1bf51f1913d6f03f6d (patch)
tree0c1f61ce12907c7a6283c42c0ef92eb57fdcca5a
parentaa4a577f6f4a957dccbf6799d84deb62cbbfbead (diff)
downloadmeta-ivi-f80a3b9ade9a092f27ddcb1bf51f1913d6f03f6d.tar.gz
meta-ivi-f80a3b9ade9a092f27ddcb1bf51f1913d6f03f6d.tar.bz2
meta-ivi-f80a3b9ade9a092f27ddcb1bf51f1913d6f03f6d.zip
bluez5: fix runtime error for 5.35 and Service API
Signed-off-by: Yong-iL Joh <yong-il.joh@windriver.com>
-rw-r--r--meta-ivi/recipes-connectivity/bluez5/bluez5/0021-core-service-Add-btd_service_get_version.patch71
-rw-r--r--meta-ivi/recipes-connectivity/bluez5/bluez5/0022-core-service-Add-btd_service_set_auto_connect.patch58
-rw-r--r--meta-ivi/recipes-connectivity/bluez5/bluez5/0023-core-service-Add-btd_service_get_auto_connect.patch41
-rw-r--r--meta-ivi/recipes-connectivity/bluez5/bluez5/0024-core-device-Use-service-auto_connect-flag.patch37
-rw-r--r--meta-ivi/recipes-connectivity/bluez5/bluez5/0025-core-Make-device_get_path-public.patch23
-rw-r--r--meta-ivi/recipes-connectivity/bluez5/bluez5/0026-core-service-Add-btd_service_set_blocked.patch50
-rw-r--r--meta-ivi/recipes-connectivity/bluez5/bluez5/0027-core-service-Add-btd_service_is_blocked.patch41
-rw-r--r--meta-ivi/recipes-connectivity/bluez5/bluez5_%.bbappend11
8 files changed, 330 insertions, 2 deletions
diff --git a/meta-ivi/recipes-connectivity/bluez5/bluez5/0021-core-service-Add-btd_service_get_version.patch b/meta-ivi/recipes-connectivity/bluez5/bluez5/0021-core-service-Add-btd_service_get_version.patch
new file mode 100644
index 0000000..444ab5f
--- /dev/null
+++ b/meta-ivi/recipes-connectivity/bluez5/bluez5/0021-core-service-Add-btd_service_get_version.patch
@@ -0,0 +1,71 @@
+From 5d58c98b9e3b9024d33fcacd282a379931b670e5 Mon Sep 17 00:00:00 2001
+From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
+Date: Fri, 7 Feb 2014 15:23:52 +0200
+Subject: [PATCH 1/7] core/service: Add btd_service_get_version
+
+This adds btd_service_get_version which can be use to query service
+version.
+
+Conflicts:
+ src/service.c
+---
+ src/service.c | 23 +++++++++++++++++++++++
+ src/service.h | 1 +
+ 2 files changed, 24 insertions(+)
+
+diff --git a/src/service.c b/src/service.c
+index f7912f5..506c741 100644
+--- a/src/service.c
++++ b/src/service.c
+@@ -38,6 +38,7 @@
+
+ #include "lib/bluetooth.h"
+ #include "lib/sdp.h"
++#include "lib/sdp_lib.h"
+
+ #include "log.h"
+ #include "backtrace.h"
+@@ -319,6 +320,28 @@ int btd_service_get_error(const struct btd_service *service)
+ return service->err;
+ }
+
++uint16_t btd_service_get_version(const struct btd_service *service)
++{
++ const sdp_record_t *rec;
++ sdp_list_t *list;
++ sdp_profile_desc_t *desc;
++ uint16_t version;
++
++ rec = btd_device_get_record(service->device,
++ service->profile->remote_uuid);
++ if (rec == NULL)
++ return 0;
++
++ if (sdp_get_profile_descs(rec, &list) < 0)
++ return 0;
++
++ desc = list->data;
++ version = desc->version;
++ sdp_list_free(list, free);
++
++ return version;
++}
++
+ unsigned int btd_service_add_state_cb(btd_service_state_cb cb, void *user_data)
+ {
+ struct service_state_callback *state_cb;
+diff --git a/src/service.h b/src/service.h
+index c1f97f6..b95bd58 100644
+--- a/src/service.h
++++ b/src/service.h
+@@ -59,6 +59,7 @@ struct btd_device *btd_service_get_device(const struct btd_service *service);
+ struct btd_profile *btd_service_get_profile(const struct btd_service *service);
+ btd_service_state_t btd_service_get_state(const struct btd_service *service);
+ int btd_service_get_error(const struct btd_service *service);
++uint16_t btd_service_get_version(const struct btd_service *service);
+
+ unsigned int btd_service_add_state_cb(btd_service_state_cb cb,
+ void *user_data);
+--
+1.9.1
+
diff --git a/meta-ivi/recipes-connectivity/bluez5/bluez5/0022-core-service-Add-btd_service_set_auto_connect.patch b/meta-ivi/recipes-connectivity/bluez5/bluez5/0022-core-service-Add-btd_service_set_auto_connect.patch
new file mode 100644
index 0000000..498f4d8
--- /dev/null
+++ b/meta-ivi/recipes-connectivity/bluez5/bluez5/0022-core-service-Add-btd_service_set_auto_connect.patch
@@ -0,0 +1,58 @@
+From 503b8a648d450289181131712fc9917a11787659 Mon Sep 17 00:00:00 2001
+From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
+Date: Fri, 7 Feb 2014 16:24:53 +0200
+Subject: [PATCH 2/7] core/service: Add btd_service_set_auto_connect
+
+---
+ src/service.c | 7 +++++++
+ src/service.h | 2 ++
+ 2 files changed, 9 insertions(+)
+
+diff --git a/src/service.c b/src/service.c
+index 506c741..a434a9d 100644
+--- a/src/service.c
++++ b/src/service.c
+@@ -55,6 +55,7 @@ struct btd_service {
+ void *user_data;
+ btd_service_state_t state;
+ int err;
++ bool auto_connect;
+ };
+
+ struct service_state_callback {
+@@ -146,6 +147,7 @@ struct btd_service *service_create(struct btd_device *device,
+ service->ref = 1;
+ service->device = device; /* Weak ref */
+ service->profile = profile;
++ service->auto_connect = profile->auto_connect;
+ service->state = BTD_SERVICE_STATE_UNAVAILABLE;
+
+ return service;
+@@ -342,6 +344,11 @@ uint16_t btd_service_get_version(const struct btd_service *service)
+ return version;
+ }
+
++void btd_service_set_auto_connect(struct btd_service *service, bool value)
++{
++ service->auto_connect = value;
++}
++
+ unsigned int btd_service_add_state_cb(btd_service_state_cb cb, void *user_data)
+ {
+ struct service_state_callback *state_cb;
+diff --git a/src/service.h b/src/service.h
+index b95bd58..e3e0b00 100644
+--- a/src/service.h
++++ b/src/service.h
+@@ -61,6 +61,8 @@ btd_service_state_t btd_service_get_state(const struct btd_service *service);
+ int btd_service_get_error(const struct btd_service *service);
+ uint16_t btd_service_get_version(const struct btd_service *service);
+
++void btd_service_set_auto_connect(struct btd_service *service, bool value);
++
+ unsigned int btd_service_add_state_cb(btd_service_state_cb cb,
+ void *user_data);
+ bool btd_service_remove_state_cb(unsigned int id);
+--
+1.9.1
+
diff --git a/meta-ivi/recipes-connectivity/bluez5/bluez5/0023-core-service-Add-btd_service_get_auto_connect.patch b/meta-ivi/recipes-connectivity/bluez5/bluez5/0023-core-service-Add-btd_service_get_auto_connect.patch
new file mode 100644
index 0000000..ce69f9f
--- /dev/null
+++ b/meta-ivi/recipes-connectivity/bluez5/bluez5/0023-core-service-Add-btd_service_get_auto_connect.patch
@@ -0,0 +1,41 @@
+From 64a040208f03225bd1612dfaaa8d0a1634e67256 Mon Sep 17 00:00:00 2001
+From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
+Date: Fri, 7 Feb 2014 16:28:08 +0200
+Subject: [PATCH 3/7] core/service: Add btd_service_get_auto_connect
+
+---
+ src/service.c | 5 +++++
+ src/service.h | 1 +
+ 2 files changed, 6 insertions(+)
+
+diff --git a/src/service.c b/src/service.c
+index a434a9d..0cd2287 100644
+--- a/src/service.c
++++ b/src/service.c
+@@ -349,6 +349,11 @@ void btd_service_set_auto_connect(struct btd_service *service, bool value)
+ service->auto_connect = value;
+ }
+
++bool btd_service_get_auto_connect(const struct btd_service *service)
++{
++ return service->auto_connect;
++}
++
+ unsigned int btd_service_add_state_cb(btd_service_state_cb cb, void *user_data)
+ {
+ struct service_state_callback *state_cb;
+diff --git a/src/service.h b/src/service.h
+index e3e0b00..cc4eac1 100644
+--- a/src/service.h
++++ b/src/service.h
+@@ -62,6 +62,7 @@ int btd_service_get_error(const struct btd_service *service);
+ uint16_t btd_service_get_version(const struct btd_service *service);
+
+ void btd_service_set_auto_connect(struct btd_service *service, bool value);
++bool btd_service_get_auto_connect(const struct btd_service *service);
+
+ unsigned int btd_service_add_state_cb(btd_service_state_cb cb,
+ void *user_data);
+--
+1.9.1
+
diff --git a/meta-ivi/recipes-connectivity/bluez5/bluez5/0024-core-device-Use-service-auto_connect-flag.patch b/meta-ivi/recipes-connectivity/bluez5/bluez5/0024-core-device-Use-service-auto_connect-flag.patch
new file mode 100644
index 0000000..4cb9a32
--- /dev/null
+++ b/meta-ivi/recipes-connectivity/bluez5/bluez5/0024-core-device-Use-service-auto_connect-flag.patch
@@ -0,0 +1,37 @@
+From 12265c3db364ed4deefd3d9c1a861080c5d5032e Mon Sep 17 00:00:00 2001
+From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
+Date: Fri, 7 Feb 2014 16:28:36 +0200
+Subject: [PATCH 4/7] core/device: Use service auto_connect flag
+
+This make use of service auto_connect flag to determine if the service
+should be included in the list to be connected.
+---
+ src/device.c | 4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+diff --git a/src/device.c b/src/device.c
+index 1f7c895..a85ff76 100644
+--- a/src/device.c
++++ b/src/device.c
+@@ -1645,7 +1645,6 @@ static int service_prio_cmp(gconstpointer a, gconstpointer b)
+ static GSList *create_pending_list(struct btd_device *dev, const char *uuid)
+ {
+ struct btd_service *service;
+- struct btd_profile *p;
+ GSList *l;
+
+ if (uuid) {
+@@ -1658,9 +1657,8 @@ static GSList *create_pending_list(struct btd_device *dev, const char *uuid)
+
+ for (l = dev->services; l != NULL; l = g_slist_next(l)) {
+ service = l->data;
+- p = btd_service_get_profile(service);
+
+- if (!p->auto_connect)
++ if (!btd_service_get_auto_connect(service))
+ continue;
+
+ if (g_slist_find(dev->pending, service))
+--
+1.9.1
+
diff --git a/meta-ivi/recipes-connectivity/bluez5/bluez5/0025-core-Make-device_get_path-public.patch b/meta-ivi/recipes-connectivity/bluez5/bluez5/0025-core-Make-device_get_path-public.patch
new file mode 100644
index 0000000..494811c
--- /dev/null
+++ b/meta-ivi/recipes-connectivity/bluez5/bluez5/0025-core-Make-device_get_path-public.patch
@@ -0,0 +1,23 @@
+--- bluez-5.33/src/device.h.orig 2016-03-11 15:43:31.503474441 +0900
++++ bluez-5.33/src/device.h 2016-03-11 15:43:45.703474020 +0900
+@@ -82,6 +82,7 @@
+ struct btd_adapter *device_get_adapter(struct btd_device *device);
+ const bdaddr_t *device_get_address(struct btd_device *device);
+ const char *device_get_path(const struct btd_device *device);
++const char *btd_device_get_path(const struct btd_device *device);
+ gboolean device_is_temporary(struct btd_device *device);
+ bool device_is_paired(struct btd_device *device, uint8_t bdaddr_type);
+ bool device_is_bonded(struct btd_device *device, uint8_t bdaddr_type);
+--- bluez-5.33/src/device.c.orig 2016-03-11 15:42:30.783476238 +0900
++++ bluez-5.33/src/device.c 2016-03-11 15:43:20.483474767 +0900
+@@ -4700,6 +4700,10 @@
+ return device->path;
+ }
+
++const char *btd_device_get_path(const struct btd_device *device) {
++ return device_get_path(device);
++}
++
+ gboolean device_is_temporary(struct btd_device *device)
+ {
+ return device->temporary;
diff --git a/meta-ivi/recipes-connectivity/bluez5/bluez5/0026-core-service-Add-btd_service_set_blocked.patch b/meta-ivi/recipes-connectivity/bluez5/bluez5/0026-core-service-Add-btd_service_set_blocked.patch
new file mode 100644
index 0000000..11f1d45
--- /dev/null
+++ b/meta-ivi/recipes-connectivity/bluez5/bluez5/0026-core-service-Add-btd_service_set_blocked.patch
@@ -0,0 +1,50 @@
+From 7ca3e1849fc6f7b41e008225ca1e2e55bb01139f Mon Sep 17 00:00:00 2001
+From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
+Date: Sat, 8 Feb 2014 13:49:50 +0200
+Subject: [PATCH 6/7] core/service: Add btd_service_set_blocked
+
+---
+ src/service.c | 6 ++++++
+ src/service.h | 2 ++
+ 2 files changed, 8 insertions(+)
+
+diff --git a/src/service.c b/src/service.c
+index 0cd2287..59553be 100644
+--- a/src/service.c
++++ b/src/service.c
+@@ -56,6 +56,7 @@ struct btd_service {
+ btd_service_state_t state;
+ int err;
+ bool auto_connect;
++ bool blocked;
+ };
+
+ struct service_state_callback {
+@@ -354,6 +355,11 @@ bool btd_service_get_auto_connect(const struct btd_service *service)
+ return service->auto_connect;
+ }
+
++void btd_service_set_blocked(struct btd_service *service, bool value)
++{
++ service->blocked = value;
++}
++
+ unsigned int btd_service_add_state_cb(btd_service_state_cb cb, void *user_data)
+ {
+ struct service_state_callback *state_cb;
+diff --git a/src/service.h b/src/service.h
+index cc4eac1..2855359 100644
+--- a/src/service.h
++++ b/src/service.h
+@@ -64,6 +64,8 @@ uint16_t btd_service_get_version(const struct btd_service *service);
+ void btd_service_set_auto_connect(struct btd_service *service, bool value);
+ bool btd_service_get_auto_connect(const struct btd_service *service);
+
++void btd_service_set_blocked(struct btd_service *service, bool value);
++
+ unsigned int btd_service_add_state_cb(btd_service_state_cb cb,
+ void *user_data);
+ bool btd_service_remove_state_cb(unsigned int id);
+--
+1.9.1
+
diff --git a/meta-ivi/recipes-connectivity/bluez5/bluez5/0027-core-service-Add-btd_service_is_blocked.patch b/meta-ivi/recipes-connectivity/bluez5/bluez5/0027-core-service-Add-btd_service_is_blocked.patch
new file mode 100644
index 0000000..a0f29fe
--- /dev/null
+++ b/meta-ivi/recipes-connectivity/bluez5/bluez5/0027-core-service-Add-btd_service_is_blocked.patch
@@ -0,0 +1,41 @@
+From 28fef24ee122e252b802d6710cb2eb49aa044475 Mon Sep 17 00:00:00 2001
+From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
+Date: Sat, 8 Feb 2014 13:52:45 +0200
+Subject: [PATCH 7/7] core/service: Add btd_service_is_blocked
+
+---
+ src/service.c | 5 +++++
+ src/service.h | 1 +
+ 2 files changed, 6 insertions(+)
+
+diff --git a/src/service.c b/src/service.c
+index 59553be..eff3c92 100644
+--- a/src/service.c
++++ b/src/service.c
+@@ -360,6 +360,11 @@ void btd_service_set_blocked(struct btd_service *service, bool value)
+ service->blocked = value;
+ }
+
++bool btd_service_is_blocked(const struct btd_service *service)
++{
++ return service->blocked;
++}
++
+ unsigned int btd_service_add_state_cb(btd_service_state_cb cb, void *user_data)
+ {
+ struct service_state_callback *state_cb;
+diff --git a/src/service.h b/src/service.h
+index 2855359..a1db44f 100644
+--- a/src/service.h
++++ b/src/service.h
+@@ -65,6 +65,7 @@ void btd_service_set_auto_connect(struct btd_service *service, bool value);
+ bool btd_service_get_auto_connect(const struct btd_service *service);
+
+ void btd_service_set_blocked(struct btd_service *service, bool value);
++bool btd_service_is_blocked(const struct btd_service *service);
+
+ unsigned int btd_service_add_state_cb(btd_service_state_cb cb,
+ void *user_data);
+--
+1.9.1
+
diff --git a/meta-ivi/recipes-connectivity/bluez5/bluez5_%.bbappend b/meta-ivi/recipes-connectivity/bluez5/bluez5_%.bbappend
index 36314fd..70187dd 100644
--- a/meta-ivi/recipes-connectivity/bluez5/bluez5_%.bbappend
+++ b/meta-ivi/recipes-connectivity/bluez5/bluez5_%.bbappend
@@ -5,7 +5,7 @@ FILESEXTRAPATHS_append := ":${THISDIR}/${PN}"
# Revision: 5.15 (Horizon)
# Homepage: https://collab.genivi.org/wiki/display/genivi/Bluetooth+Stack+Reference+Implementation
# Actual patches copied from:
-# https://review.tizen.org/git/?p=platform/upstream/bluez.git;a=commit;h=abb9a439baaaa9cd6f91ba5af8c6e426cdc8ff8e
+# http://git.baserock.org/cgit/delta/bluez.git/log/?h=baserock/5.37-19-g28fef24
#
SRC_URI_append = " \
file://0001-plugins-Add-initial-code-for-service-plugin.patch \
@@ -20,9 +20,16 @@ SRC_URI_append = " \
file://0010-plugins-service-Add-AutoConnect-property.patch \
file://0011-plugins-service-Add-Blocked-property.patch \
file://build-fix-up-with-jethro.patch \
+ file://0021-core-service-Add-btd_service_get_version.patch \
+ file://0022-core-service-Add-btd_service_set_auto_connect.patch \
+ file://0023-core-service-Add-btd_service_get_auto_connect.patch \
+ file://0024-core-device-Use-service-auto_connect-flag.patch \
+ file://0025-core-Make-device_get_path-public.patch \
+ file://0026-core-service-Add-btd_service_set_blocked.patch \
+ file://0027-core-service-Add-btd_service_is_blocked.patch \
"
-EXTRA_OECONF += "--enable-service"
+EXTRA_OECONF += "--enable-service --enable-sixaxis "
PACKAGES =+ " libbluetooth-plugins-service "
FILES_libbluetooth-plugins-service = "${libdir}/bluetooth/plugins/*.so"