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 */ |
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; |
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 |
} |
} |