Skip to content

Commit

Permalink
fix(tp/etp): remove some of the immediate updates to allow aborts to …
Browse files Browse the repository at this point in the history
…come through first
  • Loading branch information
GwnDaan committed Jan 6, 2024
1 parent 7687bea commit 82d8e23
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
2 changes: 0 additions & 2 deletions isobus/src/can_extended_transport_protocol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,6 @@ namespace isobus
if (0 != packetsToBeSent)
{
session->set_state(StateMachineState::SendDataPacketOffset);
update_state_machine(session);
}
}
}
Expand Down Expand Up @@ -686,7 +685,6 @@ namespace isobus
if (send_data_packet_offset(session))
{
session->set_state(StateMachineState::SendDataTransferPackets);
update_state_machine(session); // Immediately update the state machine to send the next message
}
}
break;
Expand Down
3 changes: 1 addition & 2 deletions isobus/src/can_transport_protocol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ namespace isobus
else if (StateMachineState::WaitForClearToSend != session->state)
{
// The session exists, but we're not in the right state to receive a CTS, so we must abort
CANStackLogger::warn("[TP]: Received a Clear To Send (CTS) message for 0x%05X, but not expecting one, aborting session->", parameterGroupNumber);
CANStackLogger::warn("[TP]: Received a Clear To Send (CTS) message for 0x%05X, but not expecting one, aborting session.", parameterGroupNumber);
abort_session(session, ConnectionAbortReason::ClearToSendReceivedWhileTransferInProgress);
}
else
Expand All @@ -276,7 +276,6 @@ namespace isobus
if (0 != packetsToBeSent)
{
session->set_state(StateMachineState::SendDataTransferPackets);
update_state_machine(session);
}
}
}
Expand Down

0 comments on commit 82d8e23

Please sign in to comment.