diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Sockets.c | 2 | ||||
-rw-r--r-- | src/Startup.c | 6 | ||||
-rw-r--r-- | src/httpd.h | 2 |
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" |