Skip to content

Commit 385f314

Browse files
committed
Add back frame sequence rollover fix
In the clean up effort this was removed but needs to be added back
1 parent fa9301e commit 385f314

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

base/src/main/java/com/smartdevicelink/protocol/SdlProtocolBase.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -646,6 +646,13 @@ public void sendMessage(ProtocolMessage protocolMsg) {
646646
for (int i = 0; i < frameCount; i++) {
647647

648648
frameSequenceNumber++;
649+
650+
if (frameSequenceNumber == SdlPacket.FRAME_INFO_FINAL_CONNESCUTIVE_FRAME) {
651+
//If sequence numbers roll over to 0, increment again to avoid
652+
//using the reserved sequence value for the final frame
653+
++frameSequenceNumber;
654+
}
655+
649656
if (i == frameCount - 1) {
650657
frameSequenceNumber = SdlPacket.FRAME_INFO_FINAL_CONNESCUTIVE_FRAME;
651658
}

0 commit comments

Comments
 (0)