From f93b8fe3774bdd3e43be80e5ecdd99a75d1c1ffe Mon Sep 17 00:00:00 2001 From: goldsimon Date: Thu, 14 Jun 2007 17:40:39 +0000 Subject: [PATCH] pbuf_copy(): removed copy & paste error which did not copy pbuf chains correctly --- src/core/pbuf.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/core/pbuf.c b/src/core/pbuf.c index a5d59a65..e6eecc8a 100644 --- a/src/core/pbuf.c +++ b/src/core/pbuf.c @@ -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; } }