udp.c: Only try and use pbuf_header() to make space for headers if

not a ROM or REF pbuf.
This commit is contained in:
kieranm
2007-03-20 16:58:08 +00:00
parent b035a6196a
commit b290f0442d
2 changed files with 6 additions and 2 deletions

View File

@@ -319,7 +319,7 @@ udp_send(struct udp_pcb *pcb, struct pbuf *p)
}
/* not enough space to add an UDP header to first pbuf in given p chain? */
if (pbuf_header(p, UDP_HLEN)) {
if (p->flags == PBUF_FLAG_ROM || p->flags == PBUF_FLAG_REF || pbuf_header(p, UDP_HLEN)) {
/* allocate header in a seperate new pbuf */
q = pbuf_alloc(PBUF_IP, UDP_HLEN, PBUF_RAM);
/* new header pbuf could not be allocated? */