From bf0001377ee0765926ae1848ccab76f5cdb5608a Mon Sep 17 00:00:00 2001 From: tradke Date: Fri, 4 Jan 2002 13:00:56 +0000 Subject: Callback functions, which serve registered pages, take a 'const cGH *' argument now. Also fixed a small memory leak in redirection code. git-svn-id: http://svn.cactuscode.org/arrangements/CactusConnect/HTTPD/trunk@145 1faa4e14-9dd3-4be0-9f0e-ffe519881164 --- src/Content.c | 45 +++++++++++++++++++++------------------------ 1 file changed, 21 insertions(+), 24 deletions(-) (limited to 'src/Content.c') diff --git a/src/Content.c b/src/Content.c index 4f7526d..896c25e 100644 --- a/src/Content.c +++ b/src/Content.c @@ -69,24 +69,24 @@ struct httpLink static int RegisterImages(void); -static int MainPage(cGH *cctkGH, httpRequest *request, void *data); -static int AboutPage(cGH *cctkGH, httpRequest *request, void *data); +static int MainPage(const cGH *cctkGH, httpRequest *request, void *data); +static int AboutPage(const cGH *cctkGH, httpRequest *request, void *data); -static int ShowStaticPage(cGH *cctkGH, httpRequest *request, void *data); +static int ShowStaticPage(const cGH *cctkGH, httpRequest *request, void *data); static int CompareStrings(const void *string1, const void *string2); -static int ControlPage(cGH *cctkGH, httpRequest *request, void *data); -static int ControlSet(cGH *cctkGH, httpRequest *request); -static int ControlTerminationPage(cGH *cctkGH, httpRequest *request); +static int ControlPage(const cGH *cctkGH, httpRequest *request, void *data); +static int ControlSet(const cGH *cctkGH, httpRequest *request); +static int ControlTerminationPage(const cGH *cctkGH, httpRequest *request); -static int CookieTestPage(cGH *cctkGH, httpRequest *request, void *data); +static int CookieTestPage(const cGH *cctkGH, httpRequest *request, void *data); /******************************************************************** ********************* Other Routine Prototypes ********************* ********************************************************************/ -void HTTP_ContentWork(cGH *GH); +void HTTP_ContentWork(const cGH *GH); int HTTP_RegisterPages(void); int HTTPi_RegisterGroupsPages(void); int HTTPi_RegisterThornPages(void); @@ -123,7 +123,7 @@ static const char *notauthorized_page = @endhistory @@*/ -void HTTP_ContentWork(cGH *GH) +void HTTP_ContentWork(const cGH *GH) { /* avoid compiler warning about unused parameter */ GH = GH; @@ -294,7 +294,7 @@ static int CompareStrings(const void *string1, const void *string2) @endhistory @@*/ -static int MainPage(cGH *cctkGH, httpRequest *request, void *data) +static int MainPage(const cGH *cctkGH, httpRequest *request, void *data) { DECLARE_CCTK_PARAMETERS @@ -511,18 +511,15 @@ static int MainPage(cGH *cctkGH, httpRequest *request, void *data) strcpy(message,"
  • Estimated time to completion: