mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-01-26 12:35:25 +00:00
mesh: free pending outgoing pdus
This commit is contained in:
parent
2908c9e636
commit
213a3171cf
@ -1226,12 +1226,22 @@ void mesh_network_reset(void){
|
||||
// - adv_bearer_network_pdu
|
||||
// - gatt_bearer_network_pdu
|
||||
// - outoing_pdu
|
||||
// unless they are SEG ACK messages
|
||||
#ifdef ENABLE_MESH_ADV_BEARER
|
||||
if ((adv_bearer_network_pdu != NULL) && (adv_bearer_network_pdu->pdu_header.pdu_type == MESH_PDU_TYPE_SEGMENT_ACKNOWLEDGMENT)){
|
||||
btstack_memory_mesh_network_pdu_free(adv_bearer_network_pdu);
|
||||
}
|
||||
adv_bearer_network_pdu = NULL;
|
||||
#endif
|
||||
#ifdef ENABLE_MESH_GATT_BEARER
|
||||
if ((gatt_bearer_network_pdu != NULL) && (gatt_bearer_network_pdu->pdu_header.pdu_type == MESH_PDU_TYPE_SEGMENT_ACKNOWLEDGMENT)){
|
||||
btstack_memory_mesh_network_pdu_free(gatt_bearer_network_pdu);
|
||||
}
|
||||
gatt_bearer_network_pdu = NULL;
|
||||
#endif
|
||||
if ((outgoing_pdu != NULL) && (outgoing_pdu->pdu_header.pdu_type == MESH_PDU_TYPE_SEGMENT_ACKNOWLEDGMENT)){
|
||||
btstack_memory_mesh_network_pdu_free(outgoing_pdu);
|
||||
}
|
||||
outgoing_pdu = NULL;
|
||||
|
||||
if (incoming_pdu_raw){
|
||||
|
Loading…
x
Reference in New Issue
Block a user