From c1226f79ec97133ef48e2cfe3b68ad92f483c1f0 Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Fri, 12 Jun 2020 10:11:04 -0700 Subject: [PATCH] adapter: Fix not checking status of stop discovery command Status needs to be checked in order to properly synchronize the states with the controller. --- src/adapter.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/adapter.c b/src/adapter.c index 735318497..233aef469 100644 --- a/src/adapter.c +++ b/src/adapter.c @@ -1949,6 +1949,9 @@ static void stop_discovery_complete(uint8_t status, uint16_t length, if (client) discovery_remove(client); + if (status != MGMT_STATUS_SUCCESS) + return; + adapter->discovery_type = 0x00; adapter->discovery_enable = 0x00; adapter->filtered_discovery = false; -- 2.47.3