Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH 1/2] Improve the logic when emitting Discovering signal
@ 2011-03-29 19:26 Claudio Takahasi
  2011-03-29 19:26 ` [PATCH 2/2] Add constant for interleaved discovery window Claudio Takahasi
  2011-03-30 16:42 ` [PATCH 1/2] Improve the logic when emitting Discovering signal Johan Hedberg
  0 siblings, 2 replies; 6+ messages in thread
From: Claudio Takahasi @ 2011-03-29 19:26 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Claudio Takahasi

---
 src/adapter.c |   21 ++++++++++-----------
 1 files changed, 10 insertions(+), 11 deletions(-)

diff --git a/src/adapter.c b/src/adapter.c
index 031e141..69fd5be 100644
--- a/src/adapter.c
+++ b/src/adapter.c
@@ -2826,19 +2826,18 @@ void adapter_set_state(struct btd_adapter *adapter, int state)
 			return;
 		break;
 	case STATE_LE_SCAN:
-		/* Scanning enabled */
-		if (adapter->disc_sessions) {
-			adapter->stop_discov_id = g_timeout_add(5120,
-								stop_scanning,
-								adapter);
+		discov_active = TRUE;
 
-			/* For dual mode: don't send "Discovering = TRUE"  */
-			if (bredr_capable(adapter) == TRUE)
-				return;
-		}
+		if (!adapter->disc_sessions)
+			break;
 
-		/* LE only */
-		discov_active = TRUE;
+		/* Scanning enabled */
+		adapter->stop_discov_id = g_timeout_add(5120, stop_scanning,
+							adapter);
+
+		/* For dual mode: don't send "Discovering = TRUE"  */
+		if (bredr_capable(adapter) == TRUE)
+			return;
 
 		break;
 	case STATE_IDLE:
-- 
1.7.4.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-03-30 20:47 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-29 19:26 [PATCH 1/2] Improve the logic when emitting Discovering signal Claudio Takahasi
2011-03-29 19:26 ` [PATCH 2/2] Add constant for interleaved discovery window Claudio Takahasi
2011-03-30 16:42   ` Johan Hedberg
2011-03-30 16:48     ` [PATCH v2 " Claudio Takahasi
2011-03-30 20:47       ` Johan Hedberg
2011-03-30 16:42 ` [PATCH 1/2] Improve the logic when emitting Discovering signal Johan Hedberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox