mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2025-08-07 15:04:39 +08:00
http_client: httpc_tcp_recv did not return inner_conn's recv return value
Signed-off-by: goldsimon <goldsimon@gmx.de> Reported-by: Our Air Quality <info@ourairquality.org>
This commit is contained in:
parent
ca0a356221
commit
ef29f2d401
@ -265,7 +265,6 @@ http_wait_headers(struct pbuf *p, u32_t *content_length, u16_t *total_header_len
|
|||||||
static err_t
|
static err_t
|
||||||
httpc_tcp_recv(void *arg, struct altcp_pcb *pcb, struct pbuf *p, err_t r)
|
httpc_tcp_recv(void *arg, struct altcp_pcb *pcb, struct pbuf *p, err_t r)
|
||||||
{
|
{
|
||||||
err_t ret = ERR_OK;
|
|
||||||
httpc_state_t* req = (httpc_state_t*)arg;
|
httpc_state_t* req = (httpc_state_t*)arg;
|
||||||
LWIP_UNUSED_ARG(r);
|
LWIP_UNUSED_ARG(r);
|
||||||
|
|
||||||
@ -311,7 +310,8 @@ httpc_tcp_recv(void *arg, struct altcp_pcb *pcb, struct pbuf *p, err_t r)
|
|||||||
if ((p != NULL) && (req->parse_state == HTTPC_PARSE_RX_DATA)) {
|
if ((p != NULL) && (req->parse_state == HTTPC_PARSE_RX_DATA)) {
|
||||||
req->rx_content_len += p->tot_len;
|
req->rx_content_len += p->tot_len;
|
||||||
if (req->recv_fn != NULL) {
|
if (req->recv_fn != NULL) {
|
||||||
ret = req->recv_fn(req->callback_arg, pcb, p, r);
|
/* directly return here: the connection migth already be aborted from the callback! */
|
||||||
|
return req->recv_fn(req->callback_arg, pcb, p, r);
|
||||||
} else {
|
} else {
|
||||||
altcp_recved(pcb, p->tot_len);
|
altcp_recved(pcb, p->tot_len);
|
||||||
pbuf_free(p);
|
pbuf_free(p);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user