summaryrefslogtreecommitdiffstats
path: root/cpukit
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2000-06-30 12:38:25 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2000-06-30 12:38:25 +0000
commite8fd6336c1e837b2047f3b0ba2dd53056eeb13c5 (patch)
tree1b74df2836b394b99362f62f642ae28ac95d840c /cpukit
parent068b64735c904a065049e0ca311674955313ac09 (diff)
downloadrtems-e8fd6336c1e837b2047f3b0ba2dd53056eeb13c5.tar.bz2
Patch from Chris Johns <cjohns@cybertec.com.au> so the web server
shuts down on error -- not exitting the system.
Diffstat (limited to 'cpukit')
-rw-r--r--cpukit/httpd/uemf.c7
-rw-r--r--cpukit/httpd/webmain.c8
2 files changed, 12 insertions, 3 deletions
diff --git a/cpukit/httpd/uemf.c b/cpukit/httpd/uemf.c
index a9302f989c..ef7c8f3135 100644
--- a/cpukit/httpd/uemf.c
+++ b/cpukit/httpd/uemf.c
@@ -30,6 +30,10 @@ int emfInst; /* Application instance handle */
void error(E_ARGS_DEC, int flags, char_t *fmt, ...)
{
+ va_list arglist;
+
+ va_start(arglist, fmt);
+
if (flags & E_LOG) {
/* Log error message */
@@ -40,6 +44,9 @@ void error(E_ARGS_DEC, int flags, char_t *fmt, ...)
/* Display message to the user */
}
+
+ vprintf (fmt, arglist);
+ va_end(arglist);
}
/******************************************************************************/
diff --git a/cpukit/httpd/webmain.c b/cpukit/httpd/webmain.c
index f61b649ced..9f467b5167 100644
--- a/cpukit/httpd/webmain.c
+++ b/cpukit/httpd/webmain.c
@@ -113,8 +113,10 @@ rtems_httpd_daemon()
/*
* Initialize the web server
*/
- if (initWebs() < 0) {
- rtems_panic("Unable to initialize Web server !!\n");
+ while (initWebs() < 0) {
+ printf("\nUnable to initialize Web server !!\n"
+ " Suspending the task. Resume to try again.\n");
+ rtems_task_suspend( RTEMS_SELF);
}
/*
@@ -137,7 +139,7 @@ rtems_httpd_daemon()
memLeaks();
#endif
bclose();
- rtems_task_delete( RTEMS_SELF );
+ rtems_task_delete( RTEMS_SELF );
}
/******************************************************************************/