Sync
authorAndrew McNab <andrew.mcnab@manchester.ac.uk>
Mon, 5 Jun 2006 12:29:59 +0000 (12:29 +0000)
committerAndrew McNab <andrew.mcnab@manchester.ac.uk>
Mon, 5 Jun 2006 12:29:59 +0000 (12:29 +0000)
org.gridsite.core/src/gridsite.spec
org.gridsite.core/src/mod_gridsite.c

index 993da72..6a87236 100644 (file)
@@ -158,6 +158,7 @@ fi
 %package slashgrid
 Group: Applications/Internet
 Summary: slashgrid daemon
+Requires: curl,fuse,fuse-libs
 
 %description slashgrid
 SlashGrid daemon
index 36efc51..1321eec 100644 (file)
@@ -404,7 +404,8 @@ int html_format(request_rec *r, mod_gridsite_dir_cfg *conf)
 
     /* first make a buffer big enough to hold path names we want to try */
     fd = -1;
-    s = malloc(strlen(r->filename) + strlen(conf->headfile) + 1);
+    s = apr_palloc(r->pool, 
+                       strlen(r->filename) + strlen(conf->headfile) + 1);
     strcpy(s, r->filename);
 
     for (;;)
@@ -420,8 +421,6 @@ int html_format(request_rec *r, mod_gridsite_dir_cfg *conf)
          *p = '\0';
        }
 
-    free(s);
-
     if (fd == -1) /* not found, so set up not to output one */
       {
         head_formatted   = apr_pstrdup(r->pool, "");
@@ -482,7 +481,8 @@ int html_format(request_rec *r, mod_gridsite_dir_cfg *conf)
 
     /* first make a buffer big enough to hold path names we want to try */
     fd = -1;
-    s  = malloc(strlen(r->filename) + strlen(conf->footfile));
+    s = apr_palloc(r->pool, 
+                       strlen(r->filename) + strlen(conf->footfile) + 1);
     strcpy(s, r->filename);
 
     for (;;)
@@ -499,8 +499,6 @@ int html_format(request_rec *r, mod_gridsite_dir_cfg *conf)
          *p = '\0';
        }
 
-    free(s);
-
     if (fd == -1) /* failed to find a footer, so set up empty default */
       {
         footer_formatted = apr_pstrdup(r->pool, "");
@@ -550,7 +548,6 @@ int html_dir_list(request_rec *r, mod_gridsite_dir_cfg *conf)
     struct dirent **namelist;
     
     if (r->finfo.filetype == APR_NOFILE) return HTTP_NOT_FOUND;
-        
 
     /* Put in Delegation service header if required */
     if (conf->delegationuri) delegation_header(r, conf);
@@ -564,7 +561,8 @@ int html_dir_list(request_rec *r, mod_gridsite_dir_cfg *conf)
 
         /* first make a buffer big enough to hold path names we want to try */
         fd = -1;
-        s = malloc(strlen(r->filename) + strlen(conf->headfile) + 1);
+        s = apr_palloc(r->pool, 
+                       strlen(r->filename) + strlen(conf->headfile) + 1);
         strcpy(s, r->filename);
 
         for (;;)
@@ -580,8 +578,6 @@ int html_dir_list(request_rec *r, mod_gridsite_dir_cfg *conf)
              *p = '\0';
            }
             
-        free(s);
-
         if (fd == -1) /* not found, so set up to output sensible default */
           {
             header_formatted = apr_pstrdup(r->pool, "<body bgcolor=white>");
@@ -679,7 +675,8 @@ int html_dir_list(request_rec *r, mod_gridsite_dir_cfg *conf)
 
         /* first make a buffer big enough to hold path names we want to try */
         fd = -1;
-        s  = malloc(strlen(r->filename) + strlen(conf->footfile));
+        s = apr_palloc(r->pool, 
+                       strlen(r->filename) + strlen(conf->footfile) + 1);
         strcpy(s, r->filename);
     
         for (;;)
@@ -696,8 +693,6 @@ int html_dir_list(request_rec *r, mod_gridsite_dir_cfg *conf)
              *p = '\0';
            }
             
-        free(s);
-
         if (fd == -1) /* failed to find a footer, so use standard default */
           {
             footer_formatted = apr_pstrdup(r->pool, "</body>");