diff options
| author | Patrick | 2023-05-28 16:02:53 +0200 |
|---|---|---|
| committer | Patrick | 2023-05-28 16:02:53 +0200 |
| commit | c1547dd3565f979d08a9e8e9eec8f42956e6901c (patch) | |
| tree | a121d78f25ca2217a7eeb4d272174c26747b946a /src/matrix_http_mongoose.c | |
| parent | edd4eec797ca7985a1510196be3c2be3e6ac90f8 (diff) | |
| download | matrix_esp_thesis-c1547dd3565f979d08a9e8e9eec8f42956e6901c.tar.gz matrix_esp_thesis-c1547dd3565f979d08a9e8e9eec8f42956e6901c.zip | |
dont need length variables everywhere (i think)
Diffstat (limited to 'src/matrix_http_mongoose.c')
| -rw-r--r-- | src/matrix_http_mongoose.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/matrix_http_mongoose.c b/src/matrix_http_mongoose.c index 3faefa9..d44787c 100644 --- a/src/matrix_http_mongoose.c +++ b/src/matrix_http_mongoose.c @@ -89,7 +89,7 @@ bool MatrixHttpGet(
MatrixClient * client,
const char * url,
- char * outResponseBuffer, int outResponseCap, int * outResponseLen)
+ char * outResponseBuffer, int outResponseCap)
{
MatrixHttpConnection * conn = (MatrixHttpConnection *)client->httpUserData;
@@ -110,8 +110,6 @@ MatrixHttpGet( while (! conn->dataReceived)
mg_mgr_poll(&conn->mgr, 1000);
- *outResponseLen = conn->dataLen;
-
return conn->dataReceived;
}
@@ -119,8 +117,8 @@ bool MatrixHttpPost(
MatrixClient * client,
const char * url,
- char * requestBuffer, int requestLen,
- char * outResponseBuffer, int outResponseCap, int * outResponseLen)
+ const char * requestBuffer,
+ char * outResponseBuffer, int outResponseCap)
{
MatrixHttpConnection * conn = (MatrixHttpConnection *)client->httpUserData;
@@ -138,7 +136,7 @@ MatrixHttpPost( "\r\n",
url,
host.len, host.ptr,
- requestLen,
+ strlen(requestBuffer),
requestBuffer);
conn->data = outResponseBuffer;
@@ -147,7 +145,5 @@ MatrixHttpPost( while (! conn->dataReceived)
mg_mgr_poll(&conn->mgr, 1000);
- *outResponseLen = conn->dataLen;
-
return conn->dataReceived;
}
\ No newline at end of file |
