mesh: fix model == null crash in mesh_configuration_server

This commit is contained in:
Matthias Ringwald 2019-06-12 17:43:27 +02:00
parent cbc8da7c60
commit acfb20a951

View File

@ -785,7 +785,7 @@ static void config_netkey_add_or_update_derived(void * arg){
mesh_proxy_start_advertising_with_network_id();
#endif
config_netkey_status(NULL, mesh_pdu_netkey_index(access_pdu_in_process), mesh_pdu_src(access_pdu_in_process), MESH_FOUNDATION_STATUS_SUCCESS, network_key->netkey_index);
config_netkey_status(mesh_model_get_configuration_server(), mesh_pdu_netkey_index(access_pdu_in_process), mesh_pdu_src(access_pdu_in_process), MESH_FOUNDATION_STATUS_SUCCESS, network_key->netkey_index);
mesh_access_message_processed(access_pdu_in_process);
}
@ -950,7 +950,7 @@ static void config_appkey_add_or_udpate_aid(void *arg){
mesh_transport_key_add(transport_key);
uint32_t netkey_and_appkey_index = (transport_key->appkey_index << 12) | transport_key->netkey_index;
config_appkey_status(NULL, mesh_pdu_netkey_index(access_pdu_in_process), mesh_pdu_src(access_pdu_in_process), netkey_and_appkey_index, MESH_FOUNDATION_STATUS_SUCCESS);
config_appkey_status(mesh_model_get_configuration_server(), mesh_pdu_netkey_index(access_pdu_in_process), mesh_pdu_src(access_pdu_in_process), netkey_and_appkey_index, MESH_FOUNDATION_STATUS_SUCCESS);
mesh_access_message_processed(access_pdu_in_process);
}