Bluetooth: Mesh: Fix clearing network message cache
Since the stack supports runtime reset and reprovisioning, we need to clear the network message cache whenever creating a new mesh network. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
parent
48e6bfaaa7
commit
46f8c7fb44
1 changed files with 3 additions and 0 deletions
|
@ -445,6 +445,9 @@ int bt_mesh_net_create(u16_t idx, u8_t flags, const u8_t key[16],
|
|||
return -EALREADY;
|
||||
}
|
||||
|
||||
memset(msg_cache, 0, sizeof(msg_cache));
|
||||
msg_cache_next = 0;
|
||||
|
||||
sub = &bt_mesh.sub[0];
|
||||
|
||||
sub->kr_flag = BT_MESH_KEY_REFRESH(flags);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue