Added assertions where PBUF_RAM pbufs are used and an assumption is made that this pbuf is in one piece (i.e. not chained). These assumptions clash with the possibility of converting to fully pool-based pbuf implementations, where PBUF_RAM pbufs might be chained.

This commit is contained in:
goldsimon
2007-07-03 20:28:35 +00:00
parent 2a77b9fcc7
commit eb875de67e
13 changed files with 86 additions and 15 deletions

View File

@@ -108,6 +108,8 @@ netbuf_alloc(struct netbuf *buf, u16_t size)
if (buf->p == NULL) {
return NULL;
}
LWIP_ASSERT("check that first pbuf can hold size",
(buf->p->len >= size));
buf->ptr = buf->p;
return buf->p->payload;
}