aboutsummaryrefslogtreecommitdiff
path: root/src/Startup.c
diff options
context:
space:
mode:
authorgoodale <goodale@1faa4e14-9dd3-4be0-9f0e-ffe519881164>2001-05-18 09:35:49 +0000
committergoodale <goodale@1faa4e14-9dd3-4be0-9f0e-ffe519881164>2001-05-18 09:35:49 +0000
commitd8f1697495666e3a90f1a6e438ad7111469e2f6a (patch)
tree7cfa1a8a4b76a9602aed683fbe087597def3aaa0 /src/Startup.c
parent8b12a1b456d296db9c305a1f008dbf93f515301c (diff)
Moving John's redirection stuff into a file of its own as it is a logically
independent system. All files except Startup.c and make.code.defn should be pretty much back at their beta10 state if you're trying to track this change back in time. Redirect stuff is now in Redirect.c and http_Redirect.h. Tom git-svn-id: http://svn.cactuscode.org/arrangements/CactusConnect/HTTPD/trunk@129 1faa4e14-9dd3-4be0-9f0e-ffe519881164
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);