net: http: Rename body_start to body_frag_start
Following #42026, the body_start pointer now points to the start of the body fragment in the recv_buffer as long as there is body in it, either entirely or partially. Rename the body_start to body_frag_start to better reflect what it represents. Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
This commit is contained in:
parent
d7cd42699b
commit
49c2d8a635
3 changed files with 16 additions and 16 deletions
|
@ -264,9 +264,9 @@ static int on_body(struct http_parser *parser, const char *at, size_t length)
|
|||
req->internal.response.http_cb->on_body(parser, at, length);
|
||||
}
|
||||
|
||||
/* Reset the body_start pointer for each fragment. */
|
||||
if (!req->internal.response.body_start) {
|
||||
req->internal.response.body_start = (uint8_t *)at;
|
||||
/* Reset the body_frag_start pointer for each fragment. */
|
||||
if (!req->internal.response.body_frag_start) {
|
||||
req->internal.response.body_frag_start = (uint8_t *)at;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -406,7 +406,7 @@ static int http_wait_data(int sock, struct http_request *req)
|
|||
req->internal.response.processed = 0;
|
||||
req->internal.response.data_len = 0;
|
||||
req->internal.response.content_length = 0;
|
||||
req->internal.response.body_start = NULL;
|
||||
req->internal.response.body_frag_start = NULL;
|
||||
memset(req->internal.response.http_status, 0,
|
||||
HTTP_STATUS_STR_SIZE);
|
||||
|
||||
|
@ -463,7 +463,7 @@ static int http_wait_data(int sock, struct http_request *req)
|
|||
|
||||
/* Re-use the result buffer and start to fill it again */
|
||||
req->internal.response.data_len = 0;
|
||||
req->internal.response.body_start = NULL;
|
||||
req->internal.response.body_frag_start = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue