mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-01-30 15:32:41 +00:00
mesh: update subnet on network key update and delete
This commit is contained in:
parent
a2484a8470
commit
d0d5f831a5
@ -922,6 +922,7 @@ static void config_netkey_delete_handler(mesh_model_t * mesh_model, mesh_pdu_t *
|
|||||||
|
|
||||||
// remove netkey
|
// remove netkey
|
||||||
mesh_network_key_remove(network_key);
|
mesh_network_key_remove(network_key);
|
||||||
|
|
||||||
// remove all appkeys for this netkey
|
// remove all appkeys for this netkey
|
||||||
mesh_transport_key_iterator_t it;
|
mesh_transport_key_iterator_t it;
|
||||||
mesh_transport_key_iterator_init(&it, netkey_index);
|
mesh_transport_key_iterator_init(&it, netkey_index);
|
||||||
@ -929,6 +930,10 @@ static void config_netkey_delete_handler(mesh_model_t * mesh_model, mesh_pdu_t *
|
|||||||
mesh_transport_key_t * transport_key = mesh_transport_key_iterator_get_next(&it);
|
mesh_transport_key_t * transport_key = mesh_transport_key_iterator_get_next(&it);
|
||||||
mesh_configuration_server_delete_appkey(transport_key);
|
mesh_configuration_server_delete_appkey(transport_key);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// update subnet
|
||||||
|
mesh_subnet_update_for_netkey_index(netkey_index);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
// we cannot remove the last network key
|
// we cannot remove the last network key
|
||||||
status = MESH_FOUNDATION_STATUS_CANNOT_REMOVE;
|
status = MESH_FOUNDATION_STATUS_CANNOT_REMOVE;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user