mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2025-02-07 03:40:11 +00:00
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:
parent
b035a6196a
commit
b290f0442d
@ -67,6 +67,10 @@ HISTORY
|
|||||||
|
|
||||||
++ Bug fixes:
|
++ Bug fixes:
|
||||||
|
|
||||||
|
2007-03-20 Kieran Mansley
|
||||||
|
* udp.c: Only try and use pbuf_header() to make space for headers if
|
||||||
|
not a ROM or REF pbuf.
|
||||||
|
|
||||||
2007-03-19 Frédéric Bernon
|
2007-03-19 Frédéric Bernon
|
||||||
* api_msg.h, api_msg.c, tcpip.h, tcpip.c: Add return types to tcpip_apimsg()
|
* api_msg.h, api_msg.c, tcpip.h, tcpip.c: Add return types to tcpip_apimsg()
|
||||||
and api_msg_post().
|
and api_msg_post().
|
||||||
|
@ -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? */
|
/* 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 */
|
/* allocate header in a seperate new pbuf */
|
||||||
q = pbuf_alloc(PBUF_IP, UDP_HLEN, PBUF_RAM);
|
q = pbuf_alloc(PBUF_IP, UDP_HLEN, PBUF_RAM);
|
||||||
/* new header pbuf could not be allocated? */
|
/* new header pbuf could not be allocated? */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user