Skip to content

Commit

Permalink
Amalgamation
Browse files Browse the repository at this point in the history
  • Loading branch information
erkkah committed May 25, 2023
1 parent 4dbec1d commit cad8664
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions naett.c
Original file line number Diff line number Diff line change
Expand Up @@ -839,7 +839,7 @@ int naettPlatformInitRequest(InternalRequest* req) {
static size_t readCallback(char* buffer, size_t size, size_t numItems, void* userData) {
InternalResponse* res = (InternalResponse*)userData;
InternalRequest* req = res->request;
return req->options.bodyReader(buffer, size, req->options.bodyReaderData);
return req->options.bodyReader(buffer, size * numItems, req->options.bodyReaderData);
}

static size_t writeCallback(char* ptr, size_t size, size_t numItems, void* userData) {
Expand Down Expand Up @@ -1498,7 +1498,6 @@ static void* processRequest(void* data) {

(*env)->DeleteLocalRef(env, name);
(*env)->DeleteLocalRef(env, value);
(*env)->DeleteLocalRef(env, header);
}

int statusCode = intCall(env, connection, "getResponseCode", "()I");
Expand Down

0 comments on commit cad8664

Please sign in to comment.