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/http/httpshim/httpshim.c
- Revision:
- 157:b0bdb77e27f3
- Parent:
- 156:be12b8fd5b21
- Child:
- 158:3adf725c0804
--- a/tcp/http/httpshim/httpshim.c Wed Aug 28 07:11:58 2019 +0000
+++ b/tcp/http/httpshim/httpshim.c Sun Sep 01 18:14:13 2019 +0000
@@ -10,19 +10,19 @@
It means HTTP does not need to know if it is talking directly to TCP as HTTP or via TLS in the form of HTTPS.
It means TCP does not need to know if it is talking directly to HTTP or via TLS.
*/
-void HttpShimReset(int connection, bool secure)
+void HttpShimReset(bool secure, int connection)
{
if (secure) TlsReset(connection); //Only reset TLS if appropriate
HttpFunctionReset(connection); //Always reset Http
}
-void HttpShimRequest(int connection, bool secure, int size, char* pRequestStream, uint32_t positionInRequestStream)
+void HttpShimRequest(bool secure, int connection, int size, char* pRequestStream, uint32_t positionInRequestStream)
{
if (secure) TlsRequest (connection, size, (uint8_t*)pRequestStream, positionInRequestStream);
else HttpFunctionRequest(connection, size, pRequestStream, positionInRequestStream);
}
static bool tlsRequired;
-bool HttpShimPoll (int connection, bool secure, bool clientFinished)
+bool HttpShimPoll (bool secure, int connection, bool clientFinished)
{
tlsRequired = secure;
if (tlsRequired) return TlsPoll (connection, clientFinished);
@@ -38,8 +38,8 @@
{
return TcpBufFilled();
}
-bool HttpShimGetTrace()
+bool HttpShimGetTrace(bool secure)
{
- if (tlsRequired) return TlsTrace;
- else return HttpTrace;
+ if (secure) return HttpTrace || TlsTrace;
+ else return HttpTrace;
}
\ No newline at end of file