/[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.77 by likewise, Mon Jan 24 21:05:47 2005 UTC revision 1.78 by christiaans, Fri Nov 25 12:03:38 2005 UTC
# Line 215  pbuf_alloc(pbuf_layer l, u16_t length, p Line 215  pbuf_alloc(pbuf_layer l, u16_t length, p
215    struct pbuf *p, *q, *r;    struct pbuf *p, *q, *r;
216    u16_t offset;    u16_t offset;
217    s32_t rem_len; /* remaining length */    s32_t rem_len; /* remaining length */
218    LWIP_DEBUGF(PBUF_DEBUG | DBG_TRACE | 3, ("pbuf_alloc(length=%u)\n", length));    LWIP_DEBUGF(PBUF_DEBUG | DBG_TRACE | 3, ("pbuf_alloc(length=%"U16_F")\n", length));
219    
220    /* determine header offset */    /* determine header offset */
221    offset = 0;    offset = 0;
# Line 339  pbuf_alloc(pbuf_layer l, u16_t length, p Line 339  pbuf_alloc(pbuf_layer l, u16_t length, p
339    }    }
340    /* set reference count */    /* set reference count */
341    p->ref = 1;    p->ref = 1;
342    LWIP_DEBUGF(PBUF_DEBUG | DBG_TRACE | 3, ("pbuf_alloc(length=%u) == %p\n", length, (void *)p));    LWIP_DEBUGF(PBUF_DEBUG | DBG_TRACE | 3, ("pbuf_alloc(length=%"U16_F") == %p\n", length, (void *)p));
343    return p;    return p;
344  }  }
345    
# Line 503  pbuf_header(struct pbuf *p, s16_t header Line 503  pbuf_header(struct pbuf *p, s16_t header
503    p->len += header_size_increment;    p->len += header_size_increment;
504    p->tot_len += header_size_increment;    p->tot_len += header_size_increment;
505    
506    LWIP_DEBUGF( PBUF_DEBUG, ("pbuf_header: old %p new %p (%d)\n",    LWIP_DEBUGF( PBUF_DEBUG, ("pbuf_header: old %p new %p (%"S16_F")\n",
507      (void *)payload, (void *)p->payload, header_size_increment));      (void *)payload, (void *)p->payload, header_size_increment));
508    
509    return 0;    return 0;
# Line 598  pbuf_free(struct pbuf *p) Line 598  pbuf_free(struct pbuf *p)
598      /* p->ref > 0, this pbuf is still referenced to */      /* p->ref > 0, this pbuf is still referenced to */
599      /* (and so the remaining pbufs in chain as well) */      /* (and so the remaining pbufs in chain as well) */
600      } else {      } else {
601        LWIP_DEBUGF( PBUF_DEBUG | 2, ("pbuf_free: %p has ref %u, ending here.\n", (void *)p, (unsigned int)p->ref));        LWIP_DEBUGF( PBUF_DEBUG | 2, ("pbuf_free: %p has ref %"U16_F", ending here.\n", (void *)p, (u16_t)p->ref));
602        /* stop walking through the chain */        /* stop walking through the chain */
603        p = NULL;        p = NULL;
604      }      }

Legend:
Removed from v.1.77  
changed lines
  Added in v.1.78

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