summaryrefslogtreecommitdiff
path: root/mesh/pb-adv.c
diff options
context:
space:
mode:
authorPrathyusha N <prathyusha.n@samsung.com>2020-03-25 00:57:17 +0530
committerBrian Gix <brian.gix@intel.com>2020-03-25 10:31:14 -0700
commit424f88e7b8c57adc134dbbe949395f678f5468db (patch)
treeaeb53f6b5ec4ec458608171c9b68a55f764f6e2e /mesh/pb-adv.c
parent936122a230d85c5b5a12abe5b04bbead25745366 (diff)
downloadbluez-424f88e7b8c57adc134dbbe949395f678f5468db.tar.gz
mesh: Handle close for Acceptor
Provision complete callback is handled in provision failure case. If link closed received abruptly with reason success, triggered provision complete callback. Removed session timeout and session free as they are handled in pb_adv_unreg.
Diffstat (limited to 'mesh/pb-adv.c')
-rw-r--r--mesh/pb-adv.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/mesh/pb-adv.c b/mesh/pb-adv.c
index 6ef45b8b0..291d92651 100644
--- a/mesh/pb-adv.c
+++ b/mesh/pb-adv.c
@@ -223,9 +223,6 @@ static void tx_timeout(struct l_timeout *timeout, void *user_data)
if (!l_queue_find(pb_sessions, session_match, session))
return;
- l_timeout_remove(session->tx_timeout);
- session->tx_timeout = NULL;
-
mesh_send_cancel(filter, sizeof(filter));
l_info("TX timeout");
@@ -392,17 +389,8 @@ static void pb_adv_packet(void *user_data, const uint8_t *pkt, uint16_t len)
break;
case PB_ADV_CLOSE:
- l_timeout_remove(session->tx_timeout);
l_debug("Link closed notification: %2.2x", pkt[0]);
- /* Wrap callback for pre-cleaning */
- if (true) {
- mesh_prov_close_func_t cb = session->close_cb;
- void *user_data = session->user_data;
-
- l_queue_remove(pb_sessions, session);
- l_free(session);
- cb(user_data, pkt[0]);
- }
+ session->close_cb(session->user_data, pkt[0]);
break;
case PB_ADV_ACK: