From: Prathyusha Nelluri <prathyusha.n@samsung.com>
To: linux-bluetooth@vger.kernel.org
Cc: Prathyusha N <prathyusha.n@samsung.com>
Subject: [PATCH 1/1] mesh: Fix to send close indication on timeout
Date: Tue, 3 Dec 2019 15:31:25 +0530 [thread overview]
Message-ID: <1575367285-8098-3-git-send-email-prathyusha.n@samsung.com> (raw)
In-Reply-To: <1575367285-8098-1-git-send-email-prathyusha.n@samsung.com>
From: Prathyusha N <prathyusha.n@samsung.com>
If pb_session is freed in timeout, close indication will not be sent.
pb_session is freed in pb_adv_unreg() and hence removed from tx_timeout.
Added acceptor_free() in acp_prov_close() to ensure pb_session is freed.
---
mesh/pb-adv.c | 2 --
mesh/prov-acceptor.c | 1 +
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/mesh/pb-adv.c b/mesh/pb-adv.c
index 19d1453..586cd7f 100644
--- a/mesh/pb-adv.c
+++ b/mesh/pb-adv.c
@@ -175,8 +175,6 @@ static void tx_timeout(struct l_timeout *timeout, void *user_data)
l_info("TX timeout");
cb = pb_session->close_cb;
user_data = pb_session->user_data;
- l_free(pb_session);
- pb_session = NULL;
cb(user_data, 1);
}
diff --git a/mesh/prov-acceptor.c b/mesh/prov-acceptor.c
index bca0193..03972c2 100644
--- a/mesh/prov-acceptor.c
+++ b/mesh/prov-acceptor.c
@@ -121,6 +121,7 @@ static void acceptor_free(void)
static void acp_prov_close(void *user_data, uint8_t reason)
{
/* TODO: Handle Close */
+ acceptor_free();
}
static void prov_to(struct l_timeout *timeout, void *user_data)
--
2.7.4
next prev parent reply other threads:[~2019-12-03 10:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20191203100133epcas5p1bf4b021f6cabcba3b5ff67965ccfec56@epcas5p1.samsung.com>
2019-12-03 10:01 ` [PATCH 1/1] mesh: Fix string of public-oob and static-oob Prathyusha Nelluri
2019-12-03 10:01 ` [PATCH 1/1] mesh: Fix invalid transaction number in PROV_INVITE Prathyusha Nelluri
2019-12-03 18:50 ` Gix, Brian
2019-12-03 10:01 ` Prathyusha Nelluri [this message]
2019-12-03 18:49 ` [PATCH 1/1] mesh: Fix string of public-oob and static-oob Gix, Brian
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=1575367285-8098-3-git-send-email-prathyusha.n@samsung.com \
--to=prathyusha.n@samsung.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