From 558c44cda02c0db15cd9f63c2b3e637fc9d6d3bb Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Wed, 18 Aug 2021 15:39:32 -0700 Subject: [PATCH] btdev: Fix removing advertising set if it was terminated Consider the advertising set disabled but don't remove it as the host may still reuse it. --- emulator/btdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/emulator/btdev.c b/emulator/btdev.c index 4584b0ecf..52c2b576d 100644 --- a/emulator/btdev.c +++ b/emulator/btdev.c @@ -5095,7 +5095,7 @@ static void ext_adv_term(void *data, void *user_data) if (conn && adv->type & 0x01) { adv_set_terminate(adv->dev, 0x00, adv->handle, conn->handle, 0x00); - le_ext_adv_free(adv); + ext_adv_disable(adv, NULL); } } -- 2.47.3