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
This commit is contained in:
Michał Narajowski
2018-02-27 09:56:07 +01:00
parent 35bcfc25b7
commit 63b487ad59
+8 -1
View File
@@ -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;
}