linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
To: linux-bluetooth@vger.kernel.org
Subject: [RFC 3/3] btdev: Fix removing advertising set if it was terminated
Date: Wed, 18 Aug 2021 16:06:41 -0700	[thread overview]
Message-ID: <20210818230641.168705-3-luiz.dentz@gmail.com> (raw)
In-Reply-To: <20210818230641.168705-1-luiz.dentz@gmail.com>

From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

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 7e9fa14c2..4a4c8bdcd 100644
--- a/emulator/btdev.c
+++ b/emulator/btdev.c
@@ -5120,7 +5120,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.31.1


  parent reply	other threads:[~2021-08-18 23:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-18 23:06 [RFC 1/3] btdev: Fix sending terminate advertising event to the wrong device Luiz Augusto von Dentz
2021-08-18 23:06 ` [RFC 2/3] btdev: Fix order of BT_HCI_EVT_LE_ADV_SET_TERM Luiz Augusto von Dentz
2021-08-18 23:06 ` Luiz Augusto von Dentz [this message]
2021-08-19 18:34 ` [RFC 1/3] btdev: Fix sending terminate advertising event to the wrong device Luiz Augusto von Dentz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210818230641.168705-3-luiz.dentz@gmail.com \
    --to=luiz.dentz@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).