Set the mapping flag in packets when a full mapping has been sent
Himnish1 opened this issue · comments
Check line 547 in TCPSendSock, where the mapping flag in the MPTransport data packet should be set depending if the dsn has a discontinuity right after the current dsn being sent.
public void sendData() {
int newPayloadSize = getPayloadSize();
while (newPayloadSize > 0) {
// read through the databuffer index looking for incongruity
// prepare the byte buffer
byte[] payloadBuffer = new byte[newPayloadSize];
int dataAck = dataBuffer.getSendMax();
int payloadWritten = dataBuffer.read(payloadBuffer, 0, newPayloadSize);
if (payloadWritten != newPayloadSize) {
logError("Write failure: payloadWritten: " + payloadWritten + " payloadSize" + newPayloadSize);
}
// retransmission
MPTransport dataTransport = new MPTransport(cID.srcPort, cID.destPort, MPTransport.DATA, 0, 0, dataAck, DSEQ, 0,
payloadBuffer); //CHANGE mapping flag based on len
// add to the queue once
sendDataRT(dataTransport);
newPayloadSize = getPayloadSize();
}
logOutput("Trying to send packet of 0 bytes");
}