mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2026-05-30 22:43:54 +08:00
Further update to ARP queueing: Changed pbuf_copy() implementation so that it can be reused (don't allocate the target pbuf inside pbuf_copy()).
This commit is contained in:
@@ -864,7 +864,11 @@ err_t etharp_query(struct netif *netif, struct ip_addr *ipaddr, struct pbuf *q)
|
||||
}
|
||||
if(copy_needed) {
|
||||
/* copy the whole packet into new pbufs */
|
||||
p = pbuf_copy(q);
|
||||
p = pbuf_alloc(PBUF_RAW, p->tot_len, PBUF_RAM);
|
||||
if (pbuf_copy(p, q) != ERR_OK) {
|
||||
pbuf_free(p);
|
||||
p = NULL;
|
||||
}
|
||||
} else {
|
||||
/* referencing the old pbuf is enough */
|
||||
p = q;
|
||||
|
||||
Reference in New Issue
Block a user