/[lwip]/lwip/src/core/pbuf.c
ViewVC logotype

Diff of /lwip/src/core/pbuf.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.34 by davidhaas, Mon Mar 31 21:32:30 2003 UTC revision 1.35 by likewise, Mon Mar 31 23:28:54 2003 UTC
# Line 710  pbuf_chain(struct pbuf *h, struct pbuf * Line 710  pbuf_chain(struct pbuf *h, struct pbuf *
710    LWIP_ASSERT("t != NULL", t != NULL);    LWIP_ASSERT("t != NULL", t != NULL);
711        
712    /* proceed to last pbuf of chain */    /* proceed to last pbuf of chain */
713    for (p = h; p->next != NULL; p = p->next) {    for (p = h; p != NULL; p = p->next) {
714      /* add total length of second chain to all totals of first chain */      /* add total length of second chain to all totals of first chain */
715      p->tot_len += t->tot_len;      p->tot_len += t->tot_len;
716    }    }
717    /* add total length of second chain to last buffer tot_len in first chain */  
   p->tot_len += t->tot_len;  
     
718    /* chain last pbuf of h chain (p) with first of tail (t) */    /* chain last pbuf of h chain (p) with first of tail (t) */
719    p->next = t;    p->next = t;
720    /* t is now referenced to one more time */    /* t is now referenced to one more time */
# Line 843  pbuf_take(struct pbuf *f) Line 841  pbuf_take(struct pbuf *f)
841           */           */
842          pbuf_free(p);          pbuf_free(p);
843          p = q;          p = q;
844        }        } else {
       else  
       {  
845          /* deallocate chain */          /* deallocate chain */
846          pbuf_free(top);          pbuf_free(top);
847          DEBUGF(PBUF_DEBUG | 2, ("pbuf_take: failed to allocate replacement pbuf for %p\n", (void *)p));          DEBUGF(PBUF_DEBUG | 2, ("pbuf_take: failed to allocate replacement pbuf for %p\n", (void *)p));

Legend:
Removed from v.1.34  
changed lines
  Added in v.1.35

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26