mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2025-03-29 22:20:12 +00:00
Strong assert checking against queueing behaviour in udp_send().
This commit is contained in:
parent
09aff62b11
commit
ab630b2875
@ -415,14 +415,17 @@ udp_send(struct udp_pcb *pcb, struct pbuf *p)
|
||||
if (q != p) {
|
||||
/* chained header still in front of given pbuf? */
|
||||
if (q->next == p) {
|
||||
DEBUGF(UDP_DEBUG, ("udp_send: dechaining and freeing header pbuf\n"));
|
||||
DEBUGF(UDP_DEBUG | DBG_TRACE | 2, ("udp_send: dechaining and freeing header pbuf %p\n", (void *)q));
|
||||
/* detach the header prepended earlier */
|
||||
pbuf_dechain(q);
|
||||
/* free the header */
|
||||
pbuf_free(q);
|
||||
} else {
|
||||
DEBUGF(UDP_DEBUG, ("udp_send: pbuf header not freed, seems to be queued.\n"));
|
||||
}
|
||||
/* the header now points to something else then the given pbuf */
|
||||
/* this can only happen if queueing is enabled */
|
||||
LWIP_ASSERT("ARP_QUEUEING == 1\n", ARP_QUEUEING == 1);
|
||||
DEBUGF(UDP_DEBUG | DBG_TRACE | 2, ("udp_send: pbuf header %p not freed, seems queued.\n", (void *)q));
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef UDP_STATS
|
||||
|
Loading…
x
Reference in New Issue
Block a user