Hi List,
 
I have been working with lwip 1.3.0 and FreeRTOS. Which now seems to work 
wonderfully.
 
But i have observed a minor problem with DHCP. On a few occasions i have 
experienced that
the program gets stuck in dhcp_fine_tmr(). The reason for this is that 
dhcp_start() hasn't been called yet.
 
In lwip 1.2.0 i called dhcp_start() and set the appropiate timers afterwards. 
But these timers are now started
by the tcpip_thread. Which means they are started before a call to dhcp_start() 
has been made.
 
So netif is != NULL, netif->next points to netif (only one netif) and 
netif->dhcp is = NULL.
This get you stuck in the while loop.
 
This could be prevented by adding an extra if in function dhcp_fine_tmer():
 
void
dhcp_fine_tmr()
{
   struct netif *netif = netif_list;
   /* loop through netif's */
   while (netif != NULL) {
      /* only act on DHCP configured interfaces */
     if (netif->dhcp != NULL) {
     /* timer is active (non zero), and is about to trigger now */ 
     if (netif->dhcp->request_timeout > 1) {
         netif->dhcp->request_timeout--;
     }
     else if (netif->dhcp->request_timeout == 1) {
        netif->dhcp->request_timeout--;
        /* { netif->dhcp->request_timeout == 0 } */
        LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, 
("dhcp_fine_tmr(): request timeout\n"));
       /* this clients' request timeout triggered */
       dhcp_timeout(netif);
     }
    }
    /* proceed to next network interface */
    netif = netif->next;
 
    +if (netif == netif->next && netif->dhcp == NULL)
    +{
    +   break;
    +}
   }
}
 
maybe this should also be added to the dhcp_coarse_tmr() function.
 
best regards,
Martin
_________________________________________________________________
Discover the new Windows Vista
http://search.msn.com/results.aspx?q=windows+vista&mkt=en-US&form=QBRE
_______________________________________________
lwip-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to