summaryrefslogtreecommitdiff
path: root/nuttx/examples/thttpd/main.c
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2009-12-18 22:21:20 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2009-12-18 22:21:20 +0000
commit7873ab1c30c52cdcd7a162af850c593ebee54e9f (patch)
treeec89fc6519ed2fc3b666a14f04aaa7a1ee8ae349 /nuttx/examples/thttpd/main.c
parent17e24472b5c11ce525810f7016c9c3b06b5df97c (diff)
downloadpx4-nuttx-7873ab1c30c52cdcd7a162af850c593ebee54e9f.tar.gz
px4-nuttx-7873ab1c30c52cdcd7a162af850c593ebee54e9f.tar.bz2
px4-nuttx-7873ab1c30c52cdcd7a162af850c593ebee54e9f.zip
Fixing LM3S httpd example (still broken)
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@2390 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/examples/thttpd/main.c')
-rw-r--r--nuttx/examples/thttpd/main.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/nuttx/examples/thttpd/main.c b/nuttx/examples/thttpd/main.c
index cb267b8d0..7c0c555c7 100644
--- a/nuttx/examples/thttpd/main.c
+++ b/nuttx/examples/thttpd/main.c
@@ -99,14 +99,18 @@
#ifdef CONFIG_CPP_HAVE_VARARGS
# ifdef CONFIG_DEBUG
# define message(...) lib_lowprintf(__VA_ARGS__)
+# define msgflush()
# else
# define message(...) printf(__VA_ARGS__)
+# define msgflush() fflush(stdout)
# endif
#else
# ifdef CONFIG_DEBUG
-# define message lib_lowprintf
+# define message lib_lowprintf
+# define msgflush()
# else
-# define message (void)
+# define message printf
+# define msgflush() fflush(stdout)
# endif
#endif
@@ -230,7 +234,9 @@ int user_start(int argc, char *argv[])
g_thttpdnsymbols = NEXPORTS;
message("Starting THTTPD\n");
+ msgflush();
thttpd_main(1, &thttpd_argv);
message("THTTPD terminated\n");
+ msgflush();
return 0;
}