<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Pavel Roskin wrote:
<blockquote cite="mid1237855757.5199.35.camel@mj" type="cite">
  <pre wrap="">On Fri, 2009-03-20 at 11:56 +0530, PrameelaRani wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap="">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???
    </pre>
  </blockquote>
  <pre wrap=""><!---->
No.  hostapd_global_run() is called before ret is set to 0.

  </pre>
  <blockquote type="cite">
    <pre wrap="">Why are you proceeding to label 'out' where it deinitializes all the 
interfaces and undo all registrations.
    </pre>
  </blockquote>
  <pre wrap=""><!---->
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.

  </pre>
</blockquote>
Thanks Pavel.<br>
</body>
</html>