mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2025-03-09 22:13:23 +00:00
pbuf_copy(): removed copy & paste error which did not copy pbuf chains correctly
This commit is contained in:
parent
978c68dcf8
commit
f93b8fe377
@ -718,7 +718,7 @@ pbuf_copy(struct pbuf *p_to, struct pbuf *p_from)
|
||||
offset_to = 0;
|
||||
p_to = p_to->next;
|
||||
}
|
||||
LWIP_ASSERT("offset_from <= p_from->len", offset_to <= p_from->len);
|
||||
LWIP_ASSERT("offset_from <= p_from->len", offset_from <= p_from->len);
|
||||
if (offset_from >= p_from->len) {
|
||||
/* on to next p_from (if any) */
|
||||
offset_from = 0;
|
||||
@ -729,15 +729,15 @@ pbuf_copy(struct pbuf *p_to, struct pbuf *p_from)
|
||||
/* don't copy more than one packet! */
|
||||
if (p_from->next != NULL) {
|
||||
LWIP_ASSERT("pbuf_copy() does not allow packet queues!\n",
|
||||
p_from->next == NULL);
|
||||
p_from->next == NULL);
|
||||
return ERR_VAL;
|
||||
}
|
||||
}
|
||||
if((p_to != NULL) && (p_to->len == p_to->tot_len)) {
|
||||
/* don't copy more than one packet! */
|
||||
if (p_from->next != NULL) {
|
||||
if (p_to->next != NULL) {
|
||||
LWIP_ASSERT("pbuf_copy() does not allow packet queues!\n",
|
||||
p_to->next == NULL);
|
||||
p_to->next == NULL);
|
||||
return ERR_VAL;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user