From 0efa4ed7d7b1dcbabecd19619c1b7d8232c91b25 Mon Sep 17 00:00:00 2001 From: Claudio Takahasi Date: Tue, 29 Mar 2011 11:39:41 -0300 Subject: [PATCH] Fix missing Discovering signal when scanning 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 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/adapter.c b/src/adapter.c index f719adc08..031e14130 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; -- 2.47.3