File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -471,10 +471,11 @@ static void can_try_enqueue_waiting_frame_I(struct can_instance_s* instance) {
471
471
472
472
struct can_tx_frame_s * frame = can_tx_queue_peek_I (& instance -> tx_queue );
473
473
if (frame && (!have_pending_mailbox || can_get_tx_frame_priority_X (frame ) > highest_prio_pending )) {
474
- can_tx_queue_pop_I (& instance -> tx_queue );
475
- instance -> tx_mailbox [empty_mailbox_idx ].frame = frame ;
476
- instance -> tx_mailbox [empty_mailbox_idx ].state = CAN_TX_MAILBOX_PENDING ;
477
- instance -> driver_iface -> load_tx_mailbox_I (instance -> driver_ctx , empty_mailbox_idx , & frame -> content );
474
+ if (instance -> driver_iface -> load_tx_mailbox_I (instance -> driver_ctx , empty_mailbox_idx , & frame -> content )) {
475
+ can_tx_queue_pop_I (& instance -> tx_queue );
476
+ instance -> tx_mailbox [empty_mailbox_idx ].frame = frame ;
477
+ instance -> tx_mailbox [empty_mailbox_idx ].state = CAN_TX_MAILBOX_PENDING ;
478
+ }
478
479
}
479
480
}
480
481
You can’t perform that action at this time.
0 commit comments