File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -366,10 +366,11 @@ static void can_try_enqueue_waiting_frame_I(struct can_instance_s* instance) {
366366
367367 struct can_tx_frame_s * frame = can_tx_queue_peek_I (& instance -> tx_queue );
368368 if (frame && (!have_pending_mailbox || can_get_tx_frame_priority_X (frame ) > highest_prio_pending )) {
369- can_tx_queue_pop_I (& instance -> tx_queue );
370- instance -> tx_mailbox [empty_mailbox_idx ].frame = frame ;
371- instance -> tx_mailbox [empty_mailbox_idx ].state = CAN_TX_MAILBOX_PENDING ;
372- instance -> driver_iface -> load_tx_mailbox_I (instance -> driver_ctx , empty_mailbox_idx , & frame -> content );
369+ if (instance -> driver_iface -> load_tx_mailbox_I (instance -> driver_ctx , empty_mailbox_idx , & frame -> content )) {
370+ can_tx_queue_pop_I (& instance -> tx_queue );
371+ instance -> tx_mailbox [empty_mailbox_idx ].frame = frame ;
372+ instance -> tx_mailbox [empty_mailbox_idx ].state = CAN_TX_MAILBOX_PENDING ;
373+ }
373374 }
374375}
375376
You can’t perform that action at this time.
0 commit comments