Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: oldheating gps motorhome heating
Diff: tcp/tcpsend.c
- Revision:
- 132:db2174b36a6d
- Parent:
- 131:774f7f367031
- Child:
- 133:a37eb35a03f1
--- a/tcp/tcpsend.c Tue Mar 19 12:12:26 2019 +0000 +++ b/tcp/tcpsend.c Wed Mar 20 10:55:30 2019 +0000 @@ -103,7 +103,7 @@ { if (pTcb->bytesSentToRem - pTcb->bytesAckdByRem < pTcb->window) { - if (pTcb->todo && pTcb->postComplete && (int)(MsTimerCount - pTcb->delayUntil) > 0) //don't send response until any post has completed + if (pTcb->todo && pTcb->postComplete && MsTimerUntil(pTcb->delayUntil)) //don't send response until any post has completed { dataLength = addApplicationData(pPacket, pTcb->locPort, pTcb->bytesSentToRem - 1, pTcb->remMss, pTcb->todo); if (dataLength < pTcb->remMss) @@ -239,7 +239,7 @@ if (pLocIpScope) *pLocIpScope = pTcb->locIpScope; //Reap old ones - if (MsTimerHasElapsed(pTcb->timeLastRcvd, TIMEOUT_BROKEN_LINK_MS)) + if (MsTimerInterval(pTcb->timeLastRcvd, TIMEOUT_BROKEN_LINK_MS)) { log(pTcb->remPort, "broken link -> reaping TCB"); pTcb->state = TCB_EMPTY; @@ -254,7 +254,7 @@ } //Check if have unacknowledged send bytes after the RTO - if (MsTimerHasElapsed(pTcb->timeSendsBeingAcked, TIMEOUT_RETRANSMISSION_MS)) + if (MsTimerInterval(pTcb->timeSendsBeingAcked, TIMEOUT_RETRANSMISSION_MS)) { pTcb->countSendsNotAcked++; if (pTcb->countSendsNotAcked > MAX_RETRANSMISSIONS)