mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-04-25 00:02:27 +00:00
mesh: stop ack timer on outgoing complete
This commit is contained in:
parent
39317c7757
commit
f41d95b921
@ -110,7 +110,7 @@ void mesh_transport_set_dest(mesh_transport_pdu_t * transport_pdu, uint16_t dest
|
|||||||
// prototypes
|
// prototypes
|
||||||
|
|
||||||
static void mesh_lower_transport_run(void);
|
static void mesh_lower_transport_run(void);
|
||||||
static void mesh_lower_transport_abort_transmission(void);
|
static void mesh_lower_transport_outgoing_complete(void);
|
||||||
|
|
||||||
// state
|
// state
|
||||||
static int lower_transport_retry_count;
|
static int lower_transport_retry_count;
|
||||||
@ -145,7 +145,7 @@ static void mesh_lower_transport_process_segment_acknowledgement_message(mesh_ne
|
|||||||
#ifdef LOG_LOWER_TRANSPORT
|
#ifdef LOG_LOWER_TRANSPORT
|
||||||
printf("[+] Block Ack == 0 => Abort\n");
|
printf("[+] Block Ack == 0 => Abort\n");
|
||||||
#endif
|
#endif
|
||||||
mesh_lower_transport_abort_transmission();
|
mesh_lower_transport_outgoing_complete();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (seq_zero_pdu != seq_zero_out){
|
if (seq_zero_pdu != seq_zero_out){
|
||||||
@ -165,7 +165,7 @@ static void mesh_lower_transport_process_segment_acknowledgement_message(mesh_ne
|
|||||||
#ifdef LOG_LOWER_TRANSPORT
|
#ifdef LOG_LOWER_TRANSPORT
|
||||||
printf("[+] Sent complete\n");
|
printf("[+] Sent complete\n");
|
||||||
#endif
|
#endif
|
||||||
mesh_lower_transport_abort_transmission();
|
mesh_lower_transport_outgoing_complete();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -321,19 +321,14 @@ static void mesh_lower_transport_restart_incomplete_timer(mesh_transport_pdu_t *
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void mesh_lower_transport_outgoing_complete(void){
|
static void mesh_lower_transport_outgoing_complete(void){
|
||||||
|
// stop ack timers
|
||||||
|
mesh_lower_transport_stop_acknowledgment_timer(lower_transport_outgoing_pdu);
|
||||||
|
// notify upper transport
|
||||||
mesh_transport_pdu_t * pdu = lower_transport_outgoing_pdu;
|
mesh_transport_pdu_t * pdu = lower_transport_outgoing_pdu;
|
||||||
lower_transport_outgoing_pdu = NULL;
|
lower_transport_outgoing_pdu = NULL;
|
||||||
higher_layer_handler(MESH_TRANSPORT_PDU_SENT, MESH_TRANSPORT_STATUS_SEND_ABORT_BY_REMOTE, (mesh_pdu_t *) pdu);
|
higher_layer_handler(MESH_TRANSPORT_PDU_SENT, MESH_TRANSPORT_STATUS_SEND_ABORT_BY_REMOTE, (mesh_pdu_t *) pdu);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void mesh_lower_transport_abort_transmission(void){
|
|
||||||
// stop ack timers
|
|
||||||
mesh_lower_transport_stop_acknowledgment_timer(lower_transport_outgoing_pdu);
|
|
||||||
|
|
||||||
// notify upper transport
|
|
||||||
mesh_lower_transport_outgoing_complete();
|
|
||||||
}
|
|
||||||
|
|
||||||
static mesh_transport_pdu_t * mesh_lower_transport_pdu_for_segmented_message(mesh_network_pdu_t *network_pdu){
|
static mesh_transport_pdu_t * mesh_lower_transport_pdu_for_segmented_message(mesh_network_pdu_t *network_pdu){
|
||||||
uint16_t src = mesh_network_src(network_pdu);
|
uint16_t src = mesh_network_src(network_pdu);
|
||||||
uint16_t seq_zero = ( big_endian_read_16(mesh_network_pdu_data(network_pdu), 1) >> 2) & 0x1fff;
|
uint16_t seq_zero = ( big_endian_read_16(mesh_network_pdu_data(network_pdu), 1) >> 2) & 0x1fff;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user