Thread (3 messages) flat view 3 messages, 2 authors, 2011-03-29
STALE5622d

[PATCH 1/2] Don't disable LE scan when started by external tools

From: Claudio Takahasi <hidden>
Date: 2011-03-29 14:39:40
Subsystem: the rest · Maintainer: Linus Torvalds

This patch removes the automatic LE scan disabling when it is not
triggered through the StartDiscovery() method.
---
 src/adapter.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/adapter.c b/src/adapter.c
index efe7db3..f719adc 100644
--- a/src/adapter.c
+++ b/src/adapter.c
@@ -2827,8 +2827,10 @@ void adapter_set_state(struct btd_adapter *adapter, int state)
 		break;
 	case STATE_LE_SCAN:
 		/* Scanning enabled */
-		adapter->stop_discov_id = g_timeout_add(5120,
-						stop_scanning, adapter);
+		if (adapter->disc_sessions)
+			adapter->stop_discov_id = g_timeout_add(5120,
+								stop_scanning,
+								adapter);
 
 		/* For dual mode: don't send "Discovering = TRUE"  */
 		if (bredr_capable(adapter) == TRUE)
-- 
1.7.4.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help