Skip to content

Commit

Permalink
temporary bl602 fix
Browse files Browse the repository at this point in the history
  • Loading branch information
openshwprojects committed Jul 20, 2024
1 parent 9aa163e commit c00f1a9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/httpserver/http_tcp_server.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@ static void tcp_client_thread(beken_thread_arg_t arg)
request.received = buf;
request.receivedLenmax = INCOMING_BUFFER_SIZE - 2;
request.responseCode = HTTP_RESPONSE_OK;
#if PLATFORM_BL602
request.receivedLen = recv(fd, request.received, request.receivedLenmax, 0);
request.received[request.receivedLen] = 0;
#else
request.receivedLen = 0;
while (1) {
int remaining = request.receivedLenmax - request.receivedLen;
Expand All @@ -111,6 +115,7 @@ static void tcp_client_thread(beken_thread_arg_t arg)
}
}
request.received[request.receivedLen] = 0;
#endif

request.reply = reply;
request.replylen = 0;
Expand Down

0 comments on commit c00f1a9

Please sign in to comment.