diff options
author | goodale <goodale@1faa4e14-9dd3-4be0-9f0e-ffe519881164> | 2000-09-20 15:10:32 +0000 |
---|---|---|
committer | goodale <goodale@1faa4e14-9dd3-4be0-9f0e-ffe519881164> | 2000-09-20 15:10:32 +0000 |
commit | 96d10de41c135939f0709596e9a54e6b4ab39b8c (patch) | |
tree | a2541ae54c19ecb7732990514cd82eff111fa39a | |
parent | e7b799a7d4aa8cc77ce95afd99c1f3fe04060919 (diff) |
Fixing a memory lek and a formatting statement.
Tom
git-svn-id: http://svn.cactuscode.org/arrangements/CactusConnect/HTTPD/trunk@65 1faa4e14-9dd3-4be0-9f0e-ffe519881164
-rw-r--r-- | src/Groups.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/Groups.c b/src/Groups.c index 9ccea48..7a27ef8 100644 --- a/src/Groups.c +++ b/src/Groups.c @@ -67,7 +67,7 @@ int HTTPi_RegisterGroupsPages(void) HTTP_ContentLink("/Groups/index.html", "Groups and Variables", "Information about grid variables and groups", HTTP_QUICKLINK); - + return 0; } /******************************************************************** @@ -96,6 +96,7 @@ static int GroupsPage(cGH *cctkGH, httpRequest *request, void *data) int i,j; int ngroups,nvars; cGroup gdata; + char *groupname; /* Status message */ strcpy(message,"HTTP/1.0 200 OK\r\n"); @@ -138,7 +139,7 @@ static int GroupsPage(cGH *cctkGH, httpRequest *request, void *data) strcpy(message,"<FORM action=\"/Groups.html\" method=\"GET\">\n"); retval = HTTP_Write(request, message, strlen(message)); - strcpy(message,"<center><table width=100\% cellpadding=5 " + strcpy(message,"<center><table width=100%% cellpadding=5 " "cellspacing=5 BGCOLOR=\"#E9F4D3\">" "<tr><th>Groups</th><th>Group Properties</th>" "<th>Variables</th></tr>"); @@ -147,17 +148,21 @@ static int GroupsPage(cGH *cctkGH, httpRequest *request, void *data) for(i=0; i < ngroups; i++) { strcpy(message,"<tr valign=top halign=left>"); + + groupname = CCTK_GroupName(i); if (CCTK_QueryGroupStorageI(cctkGH,i)) { sprintf(message,"%s <td>[%d] <font color=red>%s</font></td>" - "\n", message, i, CCTK_GroupName(i)); + "\n", message, i, groupname); } else { sprintf(message,"%s <td VALIGN=TOP ALIGN=LEFT>[%d] %s</td>\n", - message, i, CCTK_GroupName(i)); + message, i, groupname); } + free(groupname); + HTTP_Write(request, message, strlen(message)); /* Group Description */ |