Bluetooth: Mesh: Fix clearing Friend state upon reset

Not clearing the Friend state could risk invalid timers staying
active, etc.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
Johan Hedberg 2017-11-27 21:02:38 +02:00 committed by Johan Hedberg
commit a9a18cec7b

View file

@ -120,6 +120,10 @@ void bt_mesh_reset(void)
bt_mesh_lpn_disable(true);
}
if (IS_ENABLED(CONFIG_BT_MESH_FRIEND)) {
bt_mesh_friend_clear_net_idx(BT_MESH_KEY_ANY);
}
if (IS_ENABLED(CONFIG_BT_MESH_GATT_PROXY)) {
bt_mesh_proxy_gatt_disable();
}