diff options
author | Deokhyun Kim <dukan.kim@samsung.com> | 2020-07-24 14:06:43 +0900 |
---|---|---|
committer | Wootak Jung <wootak.jung@samsung.com> | 2020-08-21 13:40:39 +0900 |
commit | 37177d2f7337f89b87a6a2c8431c5ff63a0b19bf (patch) | |
tree | 53ea9e792c8d5b75c6757c741fb7322f6d736357 /src | |
parent | 0bdea44b72d68068ff2d21774cfe9afd0bcea8ce (diff) | |
download | bluez-37177d2f7337f89b87a6a2c8431c5ff63a0b19bf.tar.gz bluez-37177d2f7337f89b87a6a2c8431c5ff63a0b19bf.tar.bz2 bluez-37177d2f7337f89b87a6a2c8431c5ff63a0b19bf.zip |
Clear le scan resources when it's stopped by kernelsubmit/tizen/20200825.072855accepted/tizen/unified/20200826.133056
Change-Id: I76412a0d5c1fa924027c5e96cd0f812bfbb556a6
Signed-off-by: Deokhyun Kim <dukan.kim@samsung.com>
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/adapter.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/adapter.c b/src/adapter.c index b3a0cdc9..6dcf2886 100644 --- a/src/adapter.c +++ b/src/adapter.c @@ -2436,7 +2436,13 @@ static void discovering_callback(uint16_t index, uint16_t length, if (ev->discovering == FALSE) { hci_clear_bit(BDADDR_LE_PUBLIC, &adapter->discovery_type); hci_clear_bit(BDADDR_LE_RANDOM, &adapter->discovery_type); - adapter->le_discovering = false; + + if (adapter->le_discovering == true) { + struct watch_client *client; + client = adapter->le_discovery_list->data; + g_dbus_remove_watch(dbus_conn, client->watch); + adapter->le_discovering = false; + } } else { hci_set_bit(BDADDR_LE_PUBLIC, &adapter->discovery_type); hci_set_bit(BDADDR_LE_RANDOM, &adapter->discovery_type); |