* [PATCH 1/2] Don't disable LE scan when started by external tools
@ 2011-03-29 14:39 Claudio Takahasi
2011-03-29 14:39 ` [PATCH 2/2] Fix missing Discovering signal when scanning Claudio Takahasi
2011-03-29 15:10 ` [PATCH 1/2] Don't disable LE scan when started by external tools Johan Hedberg
0 siblings, 2 replies; 3+ messages in thread
From: Claudio Takahasi @ 2011-03-29 14:39 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Claudio Takahasi
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/2] Fix missing Discovering signal when scanning
2011-03-29 14:39 [PATCH 1/2] Don't disable LE scan when started by external tools Claudio Takahasi
@ 2011-03-29 14:39 ` Claudio Takahasi
2011-03-29 15:10 ` [PATCH 1/2] Don't disable LE scan when started by external tools Johan Hedberg
1 sibling, 0 replies; 3+ messages in thread
From: Claudio Takahasi @ 2011-03-29 14:39 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Claudio Takahasi
Discovery signal should have the same behaviour for both scenarios:
external and D-Bus clients. For LE scan not triggered through the
StartDiscovery() method, Discovery property is not being sent to
indicate that a discovery session has started. Signal indicating
that the session has finished is sent properly.
---
src/adapter.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/src/adapter.c b/src/adapter.c
index f719adc..031e141 100644
--- a/src/adapter.c
+++ b/src/adapter.c
@@ -2827,14 +2827,15 @@ void adapter_set_state(struct btd_adapter *adapter, int state)
break;
case STATE_LE_SCAN:
/* Scanning enabled */
- if (adapter->disc_sessions)
+ 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)
- return;
+ /* For dual mode: don't send "Discovering = TRUE" */
+ if (bredr_capable(adapter) == TRUE)
+ return;
+ }
/* LE only */
discov_active = TRUE;
--
1.7.4.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH 1/2] Don't disable LE scan when started by external tools
2011-03-29 14:39 [PATCH 1/2] Don't disable LE scan when started by external tools Claudio Takahasi
2011-03-29 14:39 ` [PATCH 2/2] Fix missing Discovering signal when scanning Claudio Takahasi
@ 2011-03-29 15:10 ` Johan Hedberg
1 sibling, 0 replies; 3+ messages in thread
From: Johan Hedberg @ 2011-03-29 15:10 UTC (permalink / raw)
To: Claudio Takahasi; +Cc: linux-bluetooth
Hi Claudio,
On Tue, Mar 29, 2011, Claudio Takahasi wrote:
> 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(-)
Both of these patches have been pushed upstream. Thanks.
Could you next send a patch to create a proper define for this
hard-coded value 5120? That should never have made it to the upstream
tree to begin with.
Johan
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-03-29 15:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-29 14:39 [PATCH 1/2] Don't disable LE scan when started by external tools Claudio Takahasi
2011-03-29 14:39 ` [PATCH 2/2] Fix missing Discovering signal when scanning Claudio Takahasi
2011-03-29 15:10 ` [PATCH 1/2] Don't disable LE scan when started by external tools Johan Hedberg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox