mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-12-25 00:14:02 +00:00
3 January 2004, Leon Woestenberg <leon.woestenberg@gmx>
udp.c: pcb->recv() callback was called even when it was NULL.
This commit is contained in:
parent
ec0c2bea6e
commit
3b715f4602
@ -280,14 +280,18 @@ udp_input(struct pbuf *p, struct netif *inp)
|
|||||||
pbuf_header(p, -UDP_HLEN);
|
pbuf_header(p, -UDP_HLEN);
|
||||||
if (pcb != NULL) {
|
if (pcb != NULL) {
|
||||||
snmp_inc_udpindatagrams();
|
snmp_inc_udpindatagrams();
|
||||||
|
/* callback */
|
||||||
|
if (pcb->recv != NULL)
|
||||||
|
{
|
||||||
pcb->recv(pcb->recv_arg, pcb, p, &(iphdr->src), src);
|
pcb->recv(pcb->recv_arg, pcb, p, &(iphdr->src), src);
|
||||||
|
}
|
||||||
#if SO_REUSE
|
#if SO_REUSE
|
||||||
/* First socket should receive now */
|
/* First socket should receive now */
|
||||||
if(reuse_port_1 || reuse_port_2) {
|
if (reuse_port_1 || reuse_port_2) {
|
||||||
/* We want to search on next socket after receiving */
|
/* We want to search on next socket after receiving */
|
||||||
pcb_temp = pcb->next;
|
pcb_temp = pcb->next;
|
||||||
|
|
||||||
if(reuse_port_1) {
|
if (reuse_port_1) {
|
||||||
/* We are searching connected sockets */
|
/* We are searching connected sockets */
|
||||||
reuse_port_1 = 0;
|
reuse_port_1 = 0;
|
||||||
reuse_port_2 = 0;
|
reuse_port_2 = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user