diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2009-08-15 20:25:13 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2009-08-15 20:25:13 +0000 |
commit | 56ab42eee7193d7d36b54522fa2dc251acb396fd (patch) | |
tree | 571c139d02f740f2f3aefe77ff3ba2b73bbdce88 /nuttx/netutils/thttpd/thttpd.c | |
parent | 0ddbcb2ada560e33f79f302c6287305acdc34e62 (diff) | |
download | px4-nuttx-56ab42eee7193d7d36b54522fa2dc251acb396fd.tar.gz px4-nuttx-56ab42eee7193d7d36b54522fa2dc251acb396fd.tar.bz2 px4-nuttx-56ab42eee7193d7d36b54522fa2dc251acb396fd.zip |
Get rid of cwd in THTTPD
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@2021 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/netutils/thttpd/thttpd.c')
-rw-r--r-- | nuttx/netutils/thttpd/thttpd.c | 22 |
1 files changed, 1 insertions, 21 deletions
diff --git a/nuttx/netutils/thttpd/thttpd.c b/nuttx/netutils/thttpd/thttpd.c index 093d89294..bf0f27de4 100644 --- a/nuttx/netutils/thttpd/thttpd.c +++ b/nuttx/netutils/thttpd/thttpd.c @@ -752,7 +752,6 @@ static void thttpd_logstats(long secs) int thttpd_main(int argc, char **argv) { - char cwd[MAXPATHLEN + 1]; int num_ready; int cnum; FAR struct connect_s *conn; @@ -775,25 +774,6 @@ int thttpd_main(int argc, char **argv) sa.sin_addr.s_addr = HTONL(CONFIG_THTTPD_IPADDR); #endif - /* Switch directories if requested */ - -#ifdef CONFIG_THTTPD_DIR - ret = chdir(CONFIG_THTTPD_DIR); - if (ret < 0) - { - ndbg("chdir: %d\n", errno); - exit(1); - } -#endif - - /* Get current directory */ - - (void)getcwd(cwd, sizeof(cwd) - 1); - if (cwd[strlen(cwd) - 1] != '/') - { - (void)strcat(cwd, "/"); - } - /* Initialize the fdwatch package to handle all of the configured * socket descriptors */ @@ -822,7 +802,7 @@ int thttpd_main(int argc, char **argv) /* Initialize the HTTP layer */ nvdbg("Calling httpd_initialize()\n"); - hs = httpd_initialize(&sa, cwd); + hs = httpd_initialize(&sa); if (!hs) { ndbg("httpd_initialize() failed\n"); |