mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2026-05-17 13:46:56 +08:00
task #14597: cleanup pbuf_header usages (use pbuf_add_header/pbuf_remove_header instead)
This commit is contained in:
@@ -1799,7 +1799,7 @@ http_post_request(struct pbuf *inp, struct http_state *hs,
|
||||
}
|
||||
if (q != NULL) {
|
||||
/* hide the remaining HTTP header */
|
||||
pbuf_header(q, -(s16_t)start_offset);
|
||||
pbuf_remove_header(q, start_offset);
|
||||
#if LWIP_HTTPD_POST_MANUAL_WND
|
||||
if (!post_auto_wnd) {
|
||||
/* already tcp_recved() this data... */
|
||||
|
||||
@@ -471,7 +471,7 @@ lwiperf_tcp_recv(void *arg, struct tcp_pcb *tpcb, struct pbuf *p, err_t err)
|
||||
return ERR_OK;
|
||||
}
|
||||
conn->next_num = 4; /* 24 bytes received... */
|
||||
tmp = pbuf_header(p, -24);
|
||||
tmp = pbuf_remove_header(p, 24);
|
||||
LWIP_ASSERT("pbuf_header failed", tmp == 0);
|
||||
}
|
||||
|
||||
|
||||
@@ -296,7 +296,7 @@ recv(void *arg, struct udp_pcb *upcb, struct pbuf *p, const ip_addr_t *addr, u16
|
||||
}
|
||||
|
||||
blknum = lwip_ntohs(sbuf[1]);
|
||||
pbuf_header(p, -TFTP_HEADER_LENGTH);
|
||||
pbuf_remove_header(p, TFTP_HEADER_LENGTH);
|
||||
|
||||
ret = tftp_state.ctx->write(tftp_state.handle, p);
|
||||
if (ret < 0) {
|
||||
|
||||
Reference in New Issue
Block a user