[PATCH BlueZ 08/12] android/scpp: Fix not unregistering on detach

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Luiz Augusto von Dentz <luiz.von.dentz@xxxxxxxxx>

---
 android/scpp.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/android/scpp.c b/android/scpp.c
index 81d698b..b831680 100644
--- a/android/scpp.c
+++ b/android/scpp.c
@@ -270,6 +270,11 @@ void bt_scpp_detach(struct bt_scpp *scan)
 	if (!scan || !scan->attrib)
 		return;
 
+	if (scan->refresh_cb_id > 0) {
+		g_attrib_unregister(scan->attrib, scan->refresh_cb_id);
+		scan->refresh_cb_id = 0;
+	}
+
 	g_attrib_unref(scan->attrib);
 	scan->attrib = NULL;
 }
-- 
1.9.3

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux