mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-02-25 15:41:00 +00:00
mesh: improve _reset functions for unit tests in mesh_network and btstack_crypto
This commit is contained in:
parent
5d948fde5b
commit
fde19096d3
@ -1220,3 +1220,7 @@ void btstack_crypto_ecc_p256_set_key(const uint8_t * public_key, const uint8_t *
|
||||
int btstack_crypto_idle(void){
|
||||
return btstack_linked_list_empty(&btstack_crypto_operations);
|
||||
}
|
||||
void btstack_crypto_reset(void){
|
||||
btstack_crypto_operations = NULL;
|
||||
btstack_crypto_wait_for_hci_result = 0;
|
||||
}
|
||||
|
@ -275,6 +275,7 @@ void btstack_crypto_ecc_p256_set_key(const uint8_t * public_key, const uint8_t *
|
||||
|
||||
// Unit testing
|
||||
int btstack_crypto_idle(void);
|
||||
void btstack_crypto_reset(void);
|
||||
|
||||
#if defined __cplusplus
|
||||
}
|
||||
|
@ -1090,12 +1090,23 @@ void mesh_network_dump(void){
|
||||
mesh_network_dump_network_pdus("network_pdus_outgoing_adv", &network_pdus_outgoing_adv);
|
||||
printf("network_pdu_in_validation: \n");
|
||||
mesh_network_dump_network_pdu(network_pdu_in_validation);
|
||||
printf("gatt_bearer_network_pdu: \n");
|
||||
mesh_network_dump_network_pdu(gatt_bearer_network_pdu);
|
||||
printf("adv_bearer_network_pdu: \n");
|
||||
mesh_network_dump_network_pdu(adv_bearer_network_pdu);
|
||||
}
|
||||
void mesh_network_reset(void){
|
||||
mesh_network_reset_network_pdus(&network_pdus_received);
|
||||
mesh_network_reset_network_pdus(&network_pdus_queued);
|
||||
mesh_network_reset_network_pdus(&network_pdus_outgoing_gatt);
|
||||
mesh_network_reset_network_pdus(&network_pdus_outgoing_adv);
|
||||
if (adv_bearer_network_pdu){
|
||||
mesh_network_pdu_free(adv_bearer_network_pdu);
|
||||
}
|
||||
if (gatt_bearer_network_pdu){
|
||||
mesh_network_pdu_free(gatt_bearer_network_pdu);
|
||||
}
|
||||
mesh_crypto_active = 0;
|
||||
}
|
||||
|
||||
// buffer pool
|
||||
|
Loading…
x
Reference in New Issue
Block a user