Skip to content

Commit 20a3a83

Browse files
PavelVPVcarlescufi
authored andcommitted
Bluetooth: Mesh: Fix node identity interleave multiple subnets
Reduce advertising duration to `max_timeout` when advertising node identity for multiple subnets. This will let the node to interleave subnets for NODE_ID_TIMEOUT. Signed-off-by: Pavel Vasilyev <[email protected]>
1 parent 326786e commit 20a3a83

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

subsys/bluetooth/mesh/proxy_srv.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -590,7 +590,7 @@ static int gatt_proxy_advertise(struct bt_mesh_subnet *sub)
590590
uint32_t active = k_uptime_get_32() - sub->node_id_start;
591591

592592
if (active < NODE_ID_TIMEOUT) {
593-
remaining = NODE_ID_TIMEOUT - active;
593+
remaining = MIN(remaining, NODE_ID_TIMEOUT - active);
594594
BT_DBG("Node ID active for %u ms, %d ms remaining",
595595
active, remaining);
596596
err = node_id_adv(sub, remaining);

0 commit comments

Comments
 (0)