Initialize THTTPD integration changes

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@2006 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo
2009-08-02 15:08:09 +00:00
parent ea16dce2f3
commit 4322c23e43
6 changed files with 43 additions and 28 deletions
+6 -1
View File
@@ -175,7 +175,7 @@ static void shut_down(void)
}
}
if (hs != (httpd_server *) 0)
if (hs)
{
httpd_server *ths = hs;
hs = (httpd_server *) 0;
@@ -747,6 +747,8 @@ int thttpd_main(int argc, char **argv)
int ret;
#endif
nvdbg("THTTPD started\n");
/* Setup host address */
#ifdef CONFIG_NET_IPv6
@@ -803,9 +805,11 @@ int thttpd_main(int argc, char **argv)
/* Initialize the HTTP layer */
nvdbg("Calling httpd_initialize()\n");
hs = httpd_initialize(&sa, cwd);
if (!hs)
{
ndbg("httpd_initialize() failed\n");
exit(1);
}
@@ -870,6 +874,7 @@ int thttpd_main(int argc, char **argv)
/* Main loop */
nvdbg("Entering the main loop\n");
(void)gettimeofday(&tv, (struct timezone *)0);
while ((!terminate) || num_connects > 0)
{