diff mbox series

[RFC,1/3] btdev: Fix sending terminate advertising event to the wrong device

Message ID 20210818230641.168705-1-luiz.dentz@gmail.com
State New
Headers show
Series [RFC,1/3] btdev: Fix sending terminate advertising event to the wrong device | expand

Commit Message

Luiz Augusto von Dentz Aug. 18, 2021, 11:06 p.m. UTC
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

The device where the event should be sent is the same that had created
not the connection one.
---
 emulator/btdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Luiz Augusto von Dentz Aug. 19, 2021, 6:34 p.m. UTC | #1
Hi,

On Wed, Aug 18, 2021 at 4:06 PM Luiz Augusto von Dentz
<luiz.dentz@gmail.com> wrote:
>
> From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
>
> The device where the event should be sent is the same that had created
> not the connection one.
> ---
>  emulator/btdev.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/emulator/btdev.c b/emulator/btdev.c
> index 6e1d3c346..cd0cfa45f 100644
> --- a/emulator/btdev.c
> +++ b/emulator/btdev.c
> @@ -5118,7 +5118,7 @@ static void ext_adv_term(void *data, void *user_data)
>
>         /* if connectable bit is set the send adv terminate */
>         if (conn && adv->type & 0x01) {
> -               adv_set_terminate(conn->dev, 0x00, adv->handle, conn->handle,
> +               adv_set_terminate(adv->dev, 0x00, adv->handle, conn->handle,
>                                                                         0x00);
>                 le_ext_adv_free(adv);
>         }
> --
> 2.31.1
>

Pushed.
diff mbox series

Patch

diff --git a/emulator/btdev.c b/emulator/btdev.c
index 6e1d3c346..cd0cfa45f 100644
--- a/emulator/btdev.c
+++ b/emulator/btdev.c
@@ -5118,7 +5118,7 @@  static void ext_adv_term(void *data, void *user_data)
 
 	/* if connectable bit is set the send adv terminate */
 	if (conn && adv->type & 0x01) {
-		adv_set_terminate(conn->dev, 0x00, adv->handle, conn->handle,
+		adv_set_terminate(adv->dev, 0x00, adv->handle, conn->handle,
 									0x00);
 		le_ext_adv_free(adv);
 	}