From 63b487ad59a15d268dc2a51d493ad0d2582dd49a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Narajowski?= Date: Tue, 20 Feb 2018 14:24:33 +0100 Subject: [PATCH] mesh: Resend Link Acknowledgment when necessary The Provisioner might have missed our earlier Link Acknowledgement, so if we receive another one with matching Link ID and link.expect state, simply send another acknowledgement. X-Original-Commit: b6d823cb5131e8750d7ec1152b4d48ea60ac85c3 --- nimble/host/mesh/src/prov.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/nimble/host/mesh/src/prov.c b/nimble/host/mesh/src/prov.c index 0a2d3b293..04cab17d3 100644 --- a/nimble/host/mesh/src/prov.c +++ b/nimble/host/mesh/src/prov.c @@ -1179,7 +1179,14 @@ static void link_open(struct prov_rx *rx, struct os_mbuf *buf) } if (atomic_test_bit(link.flags, LINK_ACTIVE)) { - BT_WARN("Ignoring bearer open: link already active"); + /* Send another link ack if the provisioner missed the last */ + if (link.id == rx->link_id && link.expect == PROV_INVITE) { + BT_DBG("Resending link ack"); + bearer_ctl_send(LINK_ACK, NULL, 0); + } else { + BT_WARN("Ignoring bearer open: link already active"); + } + return; }