lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE : Antw: Re: [lwip-users] Stop DHCP client


From: Frédéric BERNON
Subject: RE : Antw: Re: [lwip-users] Stop DHCP client
Date: Tue, 19 Jun 2007 09:28:22 +0200

But be careful, directly call dhcp_stop is not safe-thread, because this call 
free the dhcp field in netif, and if this call is done during the time of one 
of the dhcp timers, the timer could access to an invalid field and crash your 
stack. In last CVS HEAD, we have add a netifapi to send command like dhcp_stop 
in the tcpip_thread context to avoid this kind of problem... 
  
====================================
Frédéric BERNON 
HYMATOM SA 
Chef de projet informatique 
Microsoft Certified Professional 
Tél. : +33 (0)4-67-87-61-10 
Fax. : +33 (0)4-67-70-85-44 
Email : address@hidden 
Web Site : http://www.hymatom.fr 
====================================
P Avant d'imprimer, penser à l'environnement
 


-----Message d'origine-----
De : address@hidden [mailto:address@hidden De la part de Goldschmidt Simon
Envoyé : mardi 19 juin 2007 08:31
À : Mailing list for lwIP users
Objet : RE: Antw: Re: [lwip-users] Stop DHCP client


> >>> "Thomas Taranowski" <address@hidden> schrieb am
> 19.06.2007 um 03:57:
> > Yes, calling dhcp_stop should be enough.  I'm not sure how
> you would
> > stop the timer routines, unless you modify the code.  Stopping the
> > timers isn't really necessary, unless you are really trying 
> to optimize CPU usage.
> 
> >From dhcp.c:
> 
>  * Then have your application call dhcp_coarse_tmr() and
>  * dhcp_fine_tmr() on the defined intervals.
> 
> I meant stopping the calls to this functions. Or is this
> comment out of date?

It is, kind of. Depends on which version you're using...
Newer versions automatically start a timer and call those functions on the 
necessary intervals. (See tcpip.c:tcpip_thread() if your version already does 
this.)

However, it isn't really necessary to stop the timer since it doesn''t run that 
often.

Simon


_______________________________________________
lwip-users mailing list
address@hidden http://lists.nongnu.org/mailman/listinfo/lwip-users

Attachment: Frédéric BERNON.vcf
Description: Frédéric BERNON.vcf


reply via email to

[Prev in Thread] Current Thread [Next in Thread]