mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2026-08-10 17:43:39 +08:00
Even more pbuf_header -> pbuf_add/remove_header replacements (also in strings)
This commit is contained in:
@@ -459,10 +459,8 @@ altcp_mbedtls_bio_recv(void *ctx, unsigned char *buf, size_t len)
|
||||
}
|
||||
return MBEDTLS_ERR_SSL_WANT_READ;
|
||||
}
|
||||
/* limit number of bytes to copy to fit into an s16_t for pbuf_header */
|
||||
copy_len = (u16_t)LWIP_MIN(len, 0x7FFF);
|
||||
/* limit number of bytes again to copy from first pbuf in a chain only */
|
||||
copy_len = LWIP_MIN(copy_len, p->len);
|
||||
copy_len = (u16_t)LWIP_MIN(len, p->len);
|
||||
/* copy the data */
|
||||
ret = pbuf_copy_partial(p, buf, copy_len, 0);
|
||||
LWIP_ASSERT("ret == copy_len", ret == copy_len);
|
||||
|
||||
@@ -472,7 +472,7 @@ lwiperf_tcp_recv(void *arg, struct tcp_pcb *tpcb, struct pbuf *p, err_t err)
|
||||
}
|
||||
conn->next_num = 4; /* 24 bytes received... */
|
||||
tmp = pbuf_remove_header(p, 24);
|
||||
LWIP_ASSERT("pbuf_header failed", tmp == 0);
|
||||
LWIP_ASSERT("pbuf_remove_header failed", tmp == 0);
|
||||
}
|
||||
|
||||
packet_idx = 0;
|
||||
|
||||
Reference in New Issue
Block a user