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 : [EMAIL PROTECTED] 
Web Site : http://www.hymatom.fr 
====================================
P Avant d'imprimer, penser à l'environnement
 


-----Message d'origine-----
De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 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" <[EMAIL PROTECTED]> 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
[email protected] http://lists.nongnu.org/mailman/listinfo/lwip-users
BEGIN:VCARD
VERSION:2.1
N:BERNON;Frédéric;;M.
FN:Frédéric BERNON
ORG:HYMATOM SA;Recherche et Développement
TITLE:Chef de projet informatique
TEL;WORK;VOICE:04-67-87-61-10
TEL;WORK;FAX:04-67-70-85-44
ADR;WORK;ENCODING=QUOTED-PRINTABLE:;23;Zone Industrielle=0D=0A175 rue de Massacan;VENDARGUES;;34740;FRANCE;
LABEL;WORK;ENCODING=QUOTED-PRINTABLE:23=0D=0AZone Industrielle=0D=0A175 rue de Massacan=0D=0AVENDARGUES 34740=0D=
=0AFrance
URL;WORK:http://www.hymatom.fr
ROLE:Chef de projet informatique
EMAIL;PREF;INTERNET:[EMAIL PROTECTED]
REV:20020404T083210Z
END:VCARD
_______________________________________________
lwip-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to