413 |
|
|
414 |
/* did we chain a header? */ |
/* did we chain a header? */ |
415 |
if (q != p) { |
if (q != p) { |
416 |
/* chained header still in front of given pbuf? */ |
/* free the header */ |
417 |
if (q->next == p) { |
pbuf_free(q); |
|
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 { |
|
|
/* 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)); |
|
|
} |
|
418 |
} |
} |
419 |
|
|
420 |
#ifdef UDP_STATS |
#ifdef UDP_STATS |
421 |
++lwip_stats.udp.xmit; |
++lwip_stats.udp.xmit; |
422 |
#endif /* UDP_STATS */ |
#endif /* UDP_STATS */ |