task #14597: cleanup pbuf_header usages (use pbuf_add_header/pbuf_remove_header instead)

This commit is contained in:
goldsimon
2017-08-04 22:38:11 +02:00
parent 1981cf39d1
commit a1c7924cb6
16 changed files with 59 additions and 59 deletions

View File

@@ -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... */

View File

@@ -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);
}

View File

@@ -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) {