mesh: fix warnings / corner cases

This commit is contained in:
Matthias Ringwald 2020-08-10 15:16:55 +02:00
parent df71a9a479
commit 653d386b6b
2 changed files with 4 additions and 4 deletions

View File

@ -402,7 +402,7 @@ static void proxy_configuration_message_handler(mesh_network_callback_type_t cal
// mesh_lower_transport_received_mesage(MESH_NETWORK_PDU_SENT, network_pdu);
break;
case MESH_NETWORK_PDU_ENCRYPTED:
request_can_send_now_proxy_configuration_callback_handler(network_pdu);
request_can_send_now_proxy_configuration_callback_handler(received_network_pdu);
break;
default:
break;

View File

@ -967,14 +967,14 @@ static void mesh_upper_transport_run(void){
// segmented access pdus required a mesh-segmented-pdu
upper_pdu = (mesh_upper_transport_pdu_t *) pdu;
if (upper_pdu->lower_pdu == NULL){
segmented_pdu = btstack_memory_mesh_segmented_pdu_get();
upper_pdu->lower_pdu = (mesh_pdu_t *) btstack_memory_mesh_segmented_pdu_get();
}
if (segmented_pdu == NULL) {
if (upper_pdu->lower_pdu == NULL){
mesh_upper_transport_need_pdu_for_run_outgoing();
abort_outgoing_loop = true;
break;
}
upper_pdu->lower_pdu = (mesh_pdu_t *) segmented_pdu;
segmented_pdu = (mesh_segmented_pdu_t *) upper_pdu->lower_pdu;
segmented_pdu->pdu_header.pdu_type = MESH_PDU_TYPE_SEGMENTED;
// and a mesh-network-pdu for each segment in upper pdu
transmic_len = ((upper_pdu->flags & MESH_TRANSPORT_FLAG_TRANSMIC_64) != 0) ? 8 : 4;