From c1547dd3565f979d08a9e8e9eec8f42956e6901c Mon Sep 17 00:00:00 2001 From: Patrick Date: Sun, 28 May 2023 16:02:53 +0200 Subject: dont need length variables everywhere (i think) --- src/matrix_http_mongoose.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'src/matrix_http_mongoose.c') 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 -- cgit v1.2.3