doubt in the code

PrameelaRani prameelarani.g at redpinesignals.com
Tue Mar 24 02:50:12 EDT 2009


Pavel Roskin wrote:
> On Fri, 2009-03-20 at 11:56 +0530, PrameelaRani wrote:
>   
>> Hi,
>> I have started going through the hostapd code recently. I have a doubt 
>> in the main() function in hostapd.c.
>> After the interfaces are successfully initialized, ret value is set to 0 
>> and from there you have to return from the function right???
>>     
>
> No.  hostapd_global_run() is called before ret is set to 0.
>
>   
>> Why are you proceeding to label 'out' where it deinitializes all the 
>> interfaces and undo all registrations.
>>     
>
> This is done if hostapd_interface_init() failed for any interface or if
> hostapd_global_run() returned a non-zero code.
>
> You can run hostapd in gdb to see which code is executed.  For best
> results, compile hostapd without optimization.
>
>   
Thanks Pavel.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.shmoo.com/pipermail/hostap/attachments/20090324/6197775f/attachment-0001.htm 


More information about the HostAP mailing list