/[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.18 by davidhaas, Fri Mar 21 23:01:20 2003 UTC revision 1.19 by likewise, Mon Mar 24 10:29:03 2003 UTC
# Line 267  pbuf_alloc(pbuf_layer l, u16_t size, pbu Line 267  pbuf_alloc(pbuf_layer l, u16_t size, pbu
267      while(rsize > 0) {            while(rsize > 0) {      
268        q = pbuf_pool_alloc();        q = pbuf_pool_alloc();
269        if(q == NULL) {        if(q == NULL) {
270          DEBUGF(PBUF_DEBUG, ("pbuf_alloc: Out of pbufs in pool,\n"));          DEBUGF(PBUF_DEBUG | 2, ("pbuf_alloc: Out of pbufs in pool.\n"));
271  #ifdef PBUF_STATS  #ifdef PBUF_STATS
272          ++lwip_stats.pbuf.err;          ++lwip_stats.pbuf.err;
273  #endif /* PBUF_STATS */  #endif /* PBUF_STATS */
# Line 510  pbuf_header(struct pbuf *p, s16_t header Line 510  pbuf_header(struct pbuf *p, s16_t header
510    DEBUGF(PBUF_DEBUG, ("pbuf_header: old %p new %p (%d)\n", payload, p->payload, header_size));    DEBUGF(PBUF_DEBUG, ("pbuf_header: old %p new %p (%d)\n", payload, p->payload, header_size));
511        
512    if((u8_t *)p->payload < (u8_t *)p + sizeof(struct pbuf)) {    if((u8_t *)p->payload < (u8_t *)p + sizeof(struct pbuf)) {
513      DEBUGF(PBUF_DEBUG, ("pbuf_header: failed %p %p\n",      DEBUGF(PBUF_DEBUG | 2, ("pbuf_header: failed %p %p\n",
514                          (u8_t *)p->payload,                          (u8_t *)p->payload,
515                          (u8_t *)p + sizeof(struct pbuf)));                          (u8_t *)p + sizeof(struct pbuf)));
516      p->payload = payload;      p->payload = payload;
# Line 757  pbuf_unref(struct pbuf *f) Line 757  pbuf_unref(struct pbuf *f)
757        {        {
758          /* deallocate chain */          /* deallocate chain */
759          pbuf_free(top);          pbuf_free(top);
760          DEBUGF(PBUF_DEBUG, ("pbuf_unref: failed\n"));          DEBUGF(PBUF_DEBUG | 2, ("pbuf_unref: failed\n"));
761          return NULL;          return NULL;
762        }        }
763      }      }

Legend:
Removed from v.1.18  
changed lines
  Added in v.1.19

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