From 0b552223236990788479e89d5f3b0bfb2797acc1 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Fri, 1 Feb 2013 10:08:48 -0600 Subject: [PATCH] core: Fix trying go stop passive scanning multiple times --- src/adapter.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/adapter.c b/src/adapter.c index 8114f652c..9ddd2fc2e 100644 --- a/src/adapter.c +++ b/src/adapter.c @@ -4160,6 +4160,14 @@ static void update_found_devices(struct btd_adapter *adapter, return; connect_le: + /* + * If we're in the process of stopping passive scanning and + * connecting another (or maybe even the same) LE device just + * ignore this one. + */ + if (adapter->connect_le) + return; + /* * If this is an LE device that's not connected and part of the * connect_list stop passive scanning so that a connection -- 2.47.3