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:
- 154:ba9879b19d9f
- Parent:
- 147:a6093b52e654
- Child:
- 155:22f249751106
--- a/tcp/tcpsend.c Fri Jul 26 13:51:14 2019 +0000 +++ b/tcp/tcpsend.c Wed Jul 31 15:10:53 2019 +0000 @@ -46,26 +46,13 @@ static bool addAppData(int *pDataLength, void* pPacket, uint16_t port, uint32_t start, int mss, char* pAppState, char* pTlsState, bool clientFinished) { - *pDataLength = 0; - int todo = 0; - switch (port) - { - case 80: todo = HttpShimPoll(clientFinished, pAppState, pTlsState, false); break; - case 443: todo = HttpShimPoll(clientFinished, pAppState, pTlsState, true ); break; - } - switch (todo) - { - case -1: return true; - case 0: return false; - case 1: break; - } char* pData = (char*)pPacket + TcpHdrSizeGet(); TcpBufStart(start, mss, pData); bool finished = false; switch (port) { - case 80: finished = HttpShimReply(pAppState, pTlsState); break; - case 443: finished = HttpShimReply(pAppState, pTlsState); break; + case 80: finished = HttpShimPoll(clientFinished, pAppState, pTlsState, false); break; + case 443: finished = HttpShimPoll(clientFinished, pAppState, pTlsState, true ); break; } *pDataLength = TcpBufLength(); return finished;