tcpip.c, igmp.h, igmp.c: Fixed bug "#19800 : IGMP: igmp_tick() will not work with NO_SYS=1". Note that igmp_init is always in tcpip_thread (and not in tcpip_init) because we have to be sure that network interfaces are already added (mac filter is updated only in igmp_init for the moment).

This commit is contained in:
fbernon
2007-05-16 14:12:52 +00:00
parent 2e479b88a8
commit 0f8a2d6418
4 changed files with 28 additions and 19 deletions

View File

@@ -127,6 +127,17 @@ dhcp_timer_fine(void *arg)
}
#endif /* LWIP_DHCP */
#if LWIP_IGMP
static void
igmp_timer(void *arg)
{
LWIP_UNUSED_ARG(arg);
LWIP_DEBUGF(TCPIP_DEBUG, ("tcpip: igmp_tmr()\n"));
igmp_tmr();
sys_timeout( IGMP_TMR_INTERVAL, igmp_timer, NULL);
}
#endif /* LWIP_IGMP */
#if ETHARP_TCPIP_ETHINPUT
static void
ethernet_input(struct pbuf *p, struct netif *netif)
@@ -180,17 +191,19 @@ tcpip_thread(void *arg)
sys_timeout( ARP_TMR_INTERVAL, arp_timer, NULL);
#endif /* LWIP_ARP */
#if LWIP_DHCP
sys_timeout(DHCP_COARSE_TIMER_SECS*1000, dhcp_timer_coarse, NULL);
sys_timeout(DHCP_FINE_TIMER_MSECS, dhcp_timer_fine, NULL);
sys_timeout( DHCP_COARSE_TIMER_SECS*1000, dhcp_timer_coarse, NULL);
sys_timeout( DHCP_FINE_TIMER_MSECS, dhcp_timer_fine, NULL);
#endif /* LWIP_DHCP */
#if LWIP_IGMP
igmp_init();
#endif /* LWIP_IGMP */
if (tcpip_init_done != NULL) {
tcpip_init_done(tcpip_init_done_arg);
}
#if LWIP_IGMP
igmp_init();
sys_timeout( IGMP_TMR_INTERVAL, igmp_timer, NULL);
#endif /* LWIP_IGMP */
while (1) { /* MAIN Loop */
sys_mbox_fetch(mbox, (void *)&msg);
switch (msg->type) {