mesh: allow to modify network keys

This commit is contained in:
Matthias Ringwald 2019-04-23 19:20:56 +02:00
parent 9dd1a2b9b3
commit dad44b83b9
2 changed files with 4 additions and 4 deletions

View File

@ -64,7 +64,7 @@ int mesh_network_key_remove(mesh_network_key_t * network_key){
return btstack_linked_list_remove(&network_keys, (btstack_linked_item_t *) network_key); return btstack_linked_list_remove(&network_keys, (btstack_linked_item_t *) network_key);
} }
const mesh_network_key_t * mesh_network_key_list_get(uint16_t netkey_index){ mesh_network_key_t * mesh_network_key_list_get(uint16_t netkey_index){
btstack_linked_list_iterator_t it; btstack_linked_list_iterator_t it;
btstack_linked_list_iterator_init(&it, &network_keys); btstack_linked_list_iterator_init(&it, &network_keys);
while (btstack_linked_list_iterator_has_next(&it)){ while (btstack_linked_list_iterator_has_next(&it)){
@ -83,7 +83,7 @@ int mesh_network_key_iterator_has_more(mesh_network_key_iterator_t *it){
return btstack_linked_list_iterator_has_next(&it->it); return btstack_linked_list_iterator_has_next(&it->it);
} }
const mesh_network_key_t * mesh_network_key_iterator_get_next(mesh_network_key_iterator_t *it){ mesh_network_key_t * mesh_network_key_iterator_get_next(mesh_network_key_iterator_t *it){
return (mesh_network_key_t *) btstack_linked_list_iterator_next(&it->it); return (mesh_network_key_t *) btstack_linked_list_iterator_next(&it->it);
} }

View File

@ -126,7 +126,7 @@ int mesh_network_key_remove(mesh_network_key_t * network_key);
* @param netkey_index * @param netkey_index
* @returns mesh_network_key_t or NULL * @returns mesh_network_key_t or NULL
*/ */
const mesh_network_key_t * mesh_network_key_list_get(uint16_t netkey_index); mesh_network_key_t * mesh_network_key_list_get(uint16_t netkey_index);
/** /**
* @brief Initialize network key list from provisioning data * @brief Initialize network key list from provisioning data
@ -152,7 +152,7 @@ int mesh_network_key_iterator_has_more(mesh_network_key_iterator_t *it);
* @param it * @param it
* @return * @return
*/ */
const mesh_network_key_t * mesh_network_key_iterator_get_next(mesh_network_key_iterator_t *it); mesh_network_key_t * mesh_network_key_iterator_get_next(mesh_network_key_iterator_t *it);
/** /**
* @brief Iterate over all network keys with a given NID * @brief Iterate over all network keys with a given NID