aboutsummaryrefslogtreecommitdiff
path: root/src/Startup.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/Startup.c')
-rw-r--r--src/Startup.c19
1 files changed, 7 insertions, 12 deletions
diff --git a/src/Startup.c b/src/Startup.c
index a44c540..d87805e 100644
--- a/src/Startup.c
+++ b/src/Startup.c
@@ -23,6 +23,7 @@
#include "httpd.h"
#include "http_Steer.h"
+#include "http_Redirect.h"
static const char *rcsid = "$Header$";
@@ -45,7 +46,7 @@ static void HTTP_SetupPollingThread(cGH *cctkGH);
***************** Scheduled Routine Prototypes *********************
********************************************************************/
-int HTTP_Startup(CCTK_ARGUMENTS);
+int HTTP_Startup(void);
void HTTP_Work(CCTK_ARGUMENTS);
int HTTP_Shutdown(void);
@@ -82,13 +83,13 @@ static int thread_started = 0;
@endhistory
@@*/
-int HTTP_Startup(CCTK_ARGUMENTS)
+int HTTP_Startup(void)
{
DECLARE_CCTK_PARAMETERS
httpState state;
- if(CCTK_MyProc(NULL)==0)
+ if(CCTK_MyProc(NULL) == 0)
{
/* Does the server provide any pages by default ? */
if(provide_pages)
@@ -98,9 +99,9 @@ int HTTP_Startup(CCTK_ARGUMENTS)
HTTP_SetupServer(port, queue_length, hunt);
}
- else
- HTTP_RegisterRedirect();
- HTTP_SetupRedirect(cctkGH,port,queue_length,hunt);
+
+ /* Do we need to redirect to a master server ? */
+ HTTP_SetupRedirect(port,queue_length,hunt);
HTTP_UpdateState(NULL, &state);
@@ -207,14 +208,8 @@ int HTTP_Shutdown(void)
{
DECLARE_CCTK_PARAMETERS
#ifdef CCTK_PTHREADS
-<<<<<<< Startup.c
/* Wait for the polling thread to exit */
if(HTTP_IsServer() && use_pthreads && thread_started)
-=======
- /* Set the "HTTPD::terminate" parameter to flag termination
- to the polling thread and wait for it to exit */
- if(CCTK_MyProc(NULL) == 0 && use_pthreads && thread_started)
->>>>>>> 1.15
{
CCTK_ParameterSet("terminate", CCTK_THORNSTRING, "yes");
pthread_join(polling_thread, NULL);