|
From: | Joel Pålsson |
Subject: | [lwip-users] tcp_timer_ctr updated in both tcp_slowtmr() and tcp_fasttmr() |
Date: | Tue, 28 Jan 2014 10:31:48 +0000 |
Is it really correct that tcp_timer_ctr shall be updated in both tcp_slowtmr() and tcp_fasttmr()? This means that every 250ms it will be increased by one and every 500ms it is increased by two which seems strange. I would suggest removing tcp_timer_ctr++ from tcp_slowtmr(). Then I also think it should be possible to remove the following code in tcp_slowtmr(): if (pcb->last_timer == tcp_timer_ctr) { /* skip this pcb, we have already processed it */ pcb = pcb->next; continue; } Currently I don’t think this code can never be executed since tcp_timer_ctr is incremented just above and pcb->last_timer cannot be set inbetween. Any opinion about this? Regards Joel Pålsson |
[Prev in Thread] | Current Thread | [Next in Thread] |