|
From: | Carr, Anthony |
Subject: | [lwip-users] Problem with tcp_fasttmr |
Date: | Tue, 4 Dec 2012 09:33:05 +0000 |
Hi, I have an application based upon lwIP v1.3.1 without an RTOS and I am having problems under a fault condition. What is happening is during a periods of communications if I get a break in the network my unit locks-up. I have traced the cause of the lock-up as an infinite loop in tcp_fasttmr where pcb and pcb->next are the same location. void tcp_fasttmr(void) { struct tcp_pcb *pcb; for(pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) { /* If there is data which was previously "refused" by upper layer */ if (pcb->refused_data != NULL) { /* Notify again application with data previously received. */ err_t err; LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_fasttmr: notify kept packet\n")); TCP_EVENT_RECV(pcb, pcb->refused_data, ERR_OK, err); if (err == ERR_OK) { pcb->refused_data = NULL; } } /* send delayed ACKs */ if (pcb->flags & TF_ACK_DELAY) { LWIP_DEBUGF(TCP_DEBUG, ("tcp_fasttmr: delayed ACK\n")); tcp_ack_now(pcb); pcb->flags &= ~(TF_ACK_DELAY | TF_ACK_NOW); } } } I have looked through the archives and seen that other people have had the same problem but following the threads no-one offers any solution or explanation as to why this is happening. Can anyone offer an explanation as to why this is occurring? Is the solution to put in a trap to capture this condition? Tony
Anthony Carr
Principal Electronics Engineer
Unit D1, Grafton Way Basingstoke, Hampshire RG22 6HZ |
T: +44 (0)1256 467367 F: +44 (0)1256 840048 M: E: address@hidden |
This email contains confidential and/or privileged information belonging to Devlin Electronics Limited, its affiliates and/or subsidiaries. If you are not the intended reciient you are hereby notified that any disclosure, copying, distribution and/or the taking of any action based upon relieance on the contents of this transmission is strictly forbidden. If you have received this message in error; please notify the sender by retirun email and delete it from your system, If you require assistance please contact our sales office on +44 (0)1256 467367 or visit our website www.devlin.co.uk.
[Prev in Thread] | Current Thread | [Next in Thread] |