Thread (15 messages) flat view 15 messages, 1 author, 2011-08-09
STALE5514d

[PATCH BlueZ 05/14] Add disable for RSSI threshold monitor

From: Claudio Takahasi <hidden>
Date: 2011-08-09 21:00:32
Subsystem: the rest · Maintainer: Linus Torvalds

---
 src/adapter.c |   20 ++++++++++++++++++++
 src/adapter.h |    2 ++
 2 files changed, 22 insertions(+), 0 deletions(-)
diff --git a/src/adapter.c b/src/adapter.c
index 08675a1..aa65135 100644
--- a/src/adapter.c
+++ b/src/adapter.c
@@ -3666,3 +3666,23 @@ gboolean btd_adapter_enable_rssi_monitor(struct btd_adapter *adapter,
 
 	return TRUE;
 }
+
+gboolean btd_adapter_disable_rssi_monitor(struct btd_adapter *adapter,
+							bdaddr_t *bdaddr)
+{
+	struct rssi_monitor_data *monitor;
+	GSList *l;
+
+	l = g_slist_find_custom(adapter->rssi_monitors, bdaddr,
+						rssi_monitor_bacmp);
+	if (!l)
+		return FALSE;
+
+	monitor = l->data;
+
+	adapter->rssi_monitors = g_slist_remove(adapter->rssi_monitors,
+								monitor);
+	g_free(monitor);
+
+	return TRUE;
+}
diff --git a/src/adapter.h b/src/adapter.h
index ca53152..66949e7 100644
--- a/src/adapter.h
+++ b/src/adapter.h
@@ -285,3 +285,5 @@ gboolean btd_adapter_enable_rssi_monitor(struct btd_adapter *adapter,
 					bdaddr_t *bdaddr, int8_t low,
 					int high, rssi_monitor cb,
 					gpointer user_data);
+gboolean btd_adapter_disable_rssi_monitor(struct btd_adapter *adapter,
+							bdaddr_t *bdaddr);
-- 
1.7.6
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help