summaryrefslogtreecommitdiff
path: root/recipes-connectivity/bluez
diff options
context:
space:
mode:
authorJohn Klug <john.klug@multitech.com>2022-08-03 16:13:30 -0500
committerJohn Klug <john.klug@multitech.com>2022-09-02 15:55:50 -0500
commit87b34f8ffd39031071b5cca2e1f255936dd07f54 (patch)
treeb86b4648070617fd9a567a98ff57cfea9e6744dc /recipes-connectivity/bluez
parent43bda1864ad3f4cbc17c9ced5a347a6fb78981b8 (diff)
downloadmeta-mlinux-87b34f8ffd39031071b5cca2e1f255936dd07f54.tar.gz
meta-mlinux-87b34f8ffd39031071b5cca2e1f255936dd07f54.tar.bz2
meta-mlinux-87b34f8ffd39031071b5cca2e1f255936dd07f54.zip
BlueZ 5.64
Diffstat (limited to 'recipes-connectivity/bluez')
-rw-r--r--recipes-connectivity/bluez/bluez5/bluez-device-Fix-not-removing-connected-device.patch73
-rw-r--r--recipes-connectivity/bluez/bluez5_%.bbappend12
2 files changed, 81 insertions, 4 deletions
diff --git a/recipes-connectivity/bluez/bluez5/bluez-device-Fix-not-removing-connected-device.patch b/recipes-connectivity/bluez/bluez5/bluez-device-Fix-not-removing-connected-device.patch
new file mode 100644
index 0000000..9adba41
--- /dev/null
+++ b/recipes-connectivity/bluez/bluez5/bluez-device-Fix-not-removing-connected-device.patch
@@ -0,0 +1,73 @@
+diff --git a/src/adapter.c b/src/adapter.c
+index afefa1d5d..16da20034 100644
+--- a/src/adapter.c
++++ b/src/adapter.c
+@@ -7171,6 +7171,8 @@ static void adapter_remove_connection(struct btd_adapter *adapter,
+ struct btd_device *device,
+ uint8_t bdaddr_type)
+ {
++ bool remove_device = false;
++
+ DBG("");
+
+ if (!g_slist_find(adapter->connections, device)) {
+@@ -7178,7 +7180,7 @@ static void adapter_remove_connection(struct btd_adapter *adapter,
+ return;
+ }
+
+- device_remove_connection(device, bdaddr_type);
++ device_remove_connection(device, bdaddr_type, &remove_device);
+
+ if (device_is_authenticating(device))
+ device_cancel_authentication(device, TRUE);
+@@ -7188,6 +7190,13 @@ static void adapter_remove_connection(struct btd_adapter *adapter,
+ return;
+
+ adapter->connections = g_slist_remove(adapter->connections, device);
++
++ if (remove_device) {
++ const char *path = device_get_path(device);
++
++ DBG("Removing temporary device %s", path);
++ btd_adapter_remove_device(adapter, device);
++ }
+ }
+
+ static void adapter_stop(struct btd_adapter *adapter)
+diff --git a/src/device.c b/src/device.c
+index 7b451e458..c5484ca7b 100644
+--- a/src/device.c
++++ b/src/device.c
+@@ -3073,7 +3073,8 @@ static void set_temporary_timer(struct btd_device *dev, unsigned int timeout)
+ dev, NULL);
+ }
+
+-void device_remove_connection(struct btd_device *device, uint8_t bdaddr_type)
++void device_remove_connection(struct btd_device *device, uint8_t bdaddr_type,
++ bool *remove)
+ {
+ struct bearer_state *state = get_state(device, bdaddr_type);
+ DBusMessage *reply;
+@@ -3159,7 +3160,7 @@ void device_remove_connection(struct btd_device *device, uint8_t bdaddr_type)
+ DEVICE_INTERFACE, "Connected");
+
+ if (remove_device)
+- set_temporary_timer(device, 0);
++ *remove = remove_device;
+ }
+
+ guint device_add_disconnect_watch(struct btd_device *device,
+diff --git a/src/device.h b/src/device.h
+index 960255d2b..d7f886224 100644
+--- a/src/device.h
++++ b/src/device.h
+@@ -123,7 +123,8 @@ int device_notify_pincode(struct btd_device *device, gboolean secure,
+ void device_cancel_authentication(struct btd_device *device, gboolean aborted);
+ gboolean device_is_authenticating(struct btd_device *device);
+ void device_add_connection(struct btd_device *dev, uint8_t bdaddr_type);
+-void device_remove_connection(struct btd_device *device, uint8_t bdaddr_type);
++void device_remove_connection(struct btd_device *device, uint8_t bdaddr_type,
++ bool *remove);
+ void device_request_disconnect(struct btd_device *device, DBusMessage *msg);
+ bool device_is_disconnecting(struct btd_device *device);
+ void device_set_ltk_enc_size(struct btd_device *device, uint8_t enc_size);
diff --git a/recipes-connectivity/bluez/bluez5_%.bbappend b/recipes-connectivity/bluez/bluez5_%.bbappend
index 191ff00..530bd3e 100644
--- a/recipes-connectivity/bluez/bluez5_%.bbappend
+++ b/recipes-connectivity/bluez/bluez5_%.bbappend
@@ -1,10 +1,10 @@
-# Might want to skip to m6 next time, because pand
-# is now at m5.
-PR = "m1"
+# m3/m4 is at hash 1d6cfb8e625a944010956714c1802bc1e1fc6c4f
+PR = "m4"
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
-EXTRA_OECONF += "--enable-deprecated --enable-experimental"
+# enable-debug appears to be critical to prevent hangs.
+EXTRA_OECONF += "--enable-deprecated --enable-experimental --enable-debug"
RDEPENDS_${PN}-pand += "bash python3-dbus python3-logging python3-syslog"
RDEPENDS_${PN}-rfcomm += "bash python3-pygobject python3-syslog python3-logging python3-dbus python3-pybluez python3-mmap"
@@ -22,6 +22,10 @@ SRC_URI += "\
file://rfcomm/default \
file://BT-Name \
"
+
+# This patch is found in master. If the source does not have it, we must
+# include it.
+# file://bluez-device-Fix-not-removing-connected-device.patch
PACKAGES =+ "${PN}-mlinit ${PN}-bt-name libasound-module-bluez ${PN}-pand ${PN}-rfcomm"
DBTEXEC = "${D}${libexecdir}/bluetooth/"