Bluetooth: Mesh: Fix missing IVU normal mode timer when provisioning

If the network is in IV Update In Progress state when we get
provisioned we should set a timer so we eventually transition back to
Normal mode (otherwise we may end up in IVU In Progress indefinitely).

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
Johan Hedberg 2018-04-24 14:06:51 +03:00 committed by Johan Hedberg
commit c7c5829ba6

View file

@ -497,6 +497,12 @@ int bt_mesh_net_create(u16_t idx, u8_t flags, const u8_t key[16],
/* Set initial IV Update procedure state time-stamp */
bt_mesh.last_update = IV_UPDATE_UNKNOWN;
/* Set a timer to transition back to normal mode */
if (bt_mesh.iv_update) {
k_delayed_work_submit(&bt_mesh.ivu_complete,
IV_UPDATE_TIMEOUT);
}
/* Make sure we have valid beacon data to be sent */
bt_mesh_net_beacon_update(sub);