aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjshalf <jshalf@1faa4e14-9dd3-4be0-9f0e-ffe519881164>2002-01-30 19:48:56 +0000
committerjshalf <jshalf@1faa4e14-9dd3-4be0-9f0e-ffe519881164>2002-01-30 19:48:56 +0000
commit25248090dba6b3121ee822594cc28d8ee18092e5 (patch)
treea7fa3cd6b5da3abe48a426d335b9d9b4e901cc32
parent521cc3d05a5c150bb9d4df70b2ac684e8dbfaef5 (diff)
Minor mods to announce selected http port number when
hunting is on. git-svn-id: http://svn.cactuscode.org/arrangements/CactusConnect/HTTPD/trunk@152 1faa4e14-9dd3-4be0-9f0e-ffe519881164
-rw-r--r--src/Sockets.c2
-rw-r--r--src/Startup.c6
-rw-r--r--src/httpd.h2
3 files changed, 7 insertions, 3 deletions
diff --git a/src/Sockets.c b/src/Sockets.c
index 38a5ced..0eebf89 100644
--- a/src/Sockets.c
+++ b/src/Sockets.c
@@ -175,7 +175,7 @@ int HTTP_SetupServer(int port, int queue_size, int hunt)
signal(SIGPIPE,SIG_IGN);
#endif
- return 0;
+ return httpport; /* return the actual port here */
}
/*@@
diff --git a/src/Startup.c b/src/Startup.c
index f29037a..5c2928f 100644
--- a/src/Startup.c
+++ b/src/Startup.c
@@ -83,12 +83,14 @@ static int thread_started = 0;
@endhistory
@@*/
+
+static int http_actualport=5555; /* bad bad static var (should use GH) */
int HTTP_Startup(void)
{
DECLARE_CCTK_PARAMETERS
httpState state;
-
+ http_actualport=port;
if(CCTK_MyProc(NULL) == 0)
{
/* Does the server provide any pages by default ? */
@@ -97,7 +99,7 @@ int HTTP_Startup(void)
HTTP_RegisterPages();
}
- HTTP_SetupServer(port, queue_length, hunt);
+ http_actualport = HTTP_SetupServer(port, queue_length, hunt);
}
/* Do we need to redirect to a master server ? */
diff --git a/src/httpd.h b/src/httpd.h
index ccdb967..03a9fe6 100644
--- a/src/httpd.h
+++ b/src/httpd.h
@@ -21,6 +21,8 @@ typedef struct
int timeout_seconds;
int timeout_useconds;
} httpState;
+
+extern int http_actualport;
#ifdef __cplusplus
extern "C"