forked from M-Labs/artiq
1
0
Fork 0

runtime/net_server: fix PCB filter

This commit is contained in:
Sebastien Bourdeauducq 2015-12-18 01:14:57 +08:00
parent 80172f9548
commit b3abc9baf9
1 changed files with 1 additions and 5 deletions

View File

@ -220,13 +220,9 @@ void net_server_service(void)
{ {
struct tcp_pcb *pcb; struct tcp_pcb *pcb;
/*
* Assume all active TCP PCBs with a non-NULL arg are our connections.
* lwip defines "active PCB" as being able to send/receive data.
*/
pcb = tcp_active_pcbs; pcb = tcp_active_pcbs;
while(pcb) { while(pcb) {
if(pcb->callback_arg) if(pcb->recv == net_server_recv) /* filter our connections */
tcp_pcb_service(pcb->callback_arg, pcb); tcp_pcb_service(pcb->callback_arg, pcb);
pcb = pcb->next; pcb = pcb->next;
} }