linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1] Adapter: Fix Discovering state while Powering Off
@ 2012-03-30 16:56 Hemant Gupta
  2012-04-03 10:08 ` Hemant Gupta
  2012-04-03 10:41 ` Johan Hedberg
  0 siblings, 2 replies; 6+ messages in thread
From: Hemant Gupta @ 2012-03-30 16:56 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Hemant Gupta, Hemant Gupta

This patch fixes the adater discovering state while powering off.
Without this fix, BlueZ sends incorrect discovering state to upper
layers while switching off.
---
 src/adapter.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/src/adapter.c b/src/adapter.c
index f8f46f8..eb9745f 100644
--- a/src/adapter.c
+++ b/src/adapter.c
@@ -289,6 +289,12 @@ static int set_mode(struct btd_adapter *adapter, uint8_t new_mode,
 			return err;
 
 		adapter->off_requested = TRUE;
+		/*
+		 * Change the discovering state to FALSE, otherwise
+		 * inquiry fails to start if BT is switched off and then on
+		 * while inquiry is already active.
+		 */
+		adapter->discovering = FALSE;
 
 		goto done;
 	}
-- 
1.7.0.4


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

end of thread, other threads:[~2012-04-03 11:57 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-30 16:56 [PATCH v1] Adapter: Fix Discovering state while Powering Off Hemant Gupta
2012-04-03 10:08 ` Hemant Gupta
2012-04-03 10:41 ` Johan Hedberg
2012-04-03 10:50   ` Hemant GUPTA
2012-04-03 11:01     ` Johan Hedberg
2012-04-03 11:57       ` Hemant Gupta

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).