mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-02-28 06:39:49 +00:00
mesh: reorder restore to avoid publications with invalid src
This commit is contained in:
parent
74494532ac
commit
bc1c2f13ff
@ -1093,23 +1093,9 @@ static int mesh_node_startup_from_tlv(void){
|
||||
// dump into packet log
|
||||
hci_dump_log(HCI_DUMP_LOG_LEVEL_INFO, "mesh-iv-index: %08x", iv_index);
|
||||
|
||||
// load network keys
|
||||
mesh_load_network_keys();
|
||||
// load app keys
|
||||
mesh_load_app_keys();
|
||||
// load model to appkey bindings
|
||||
mesh_load_appkey_lists();
|
||||
// load virtual addresses
|
||||
mesh_load_virtual_addresses();
|
||||
// load model subscriptions
|
||||
mesh_load_subscriptions();
|
||||
// load model publications
|
||||
mesh_load_publications();
|
||||
// load foundation state
|
||||
mesh_foundation_state_load();
|
||||
|
||||
mesh_access_setup_from_provisioning_data(&provisioning_data);
|
||||
|
||||
// bump sequence number to account for interval updates
|
||||
sequence_number = mesh_sequence_number_peek() + MESH_SEQUENCE_NUMBER_STORAGE_INTERVAL;
|
||||
iv_index = mesh_get_iv_index();
|
||||
@ -1119,6 +1105,22 @@ static int mesh_node_startup_from_tlv(void){
|
||||
|
||||
printf("IV Index: %08x, Sequence Number %08x\n", (int) iv_index, (int) sequence_number);
|
||||
|
||||
// load network keys
|
||||
mesh_load_network_keys();
|
||||
// load app keys
|
||||
mesh_load_app_keys();
|
||||
|
||||
mesh_access_setup_from_provisioning_data(&provisioning_data);
|
||||
|
||||
// load model to appkey bindings
|
||||
mesh_load_appkey_lists();
|
||||
// load virtual addresses
|
||||
mesh_load_virtual_addresses();
|
||||
// load model subscriptions
|
||||
mesh_load_subscriptions();
|
||||
// load model publications
|
||||
mesh_load_publications();
|
||||
|
||||
#if defined(ENABLE_MESH_ADV_BEARER) || defined(ENABLE_MESH_PB_ADV)
|
||||
// start sending Secure Network Beacon
|
||||
mesh_subnet_t * subnet = mesh_subnet_get_by_netkey_index(0);
|
||||
|
Loading…
x
Reference in New Issue
Block a user