You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ak...@apache.org on 2001/01/05 21:44:45 UTC

cvs commit: httpd-2.0/server config.c util.c

ake         01/01/05 12:44:45

  Modified:    include  httpd.h
               modules/http http_core.c
               server   config.c util.c
  Log:
  add pool parameter to ap_is_directory and ap_is_rdirectory
  
  Revision  Changes    Path
  1.129     +6 -4      httpd-2.0/include/httpd.h
  
  Index: httpd.h
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/include/httpd.h,v
  retrieving revision 1.128
  retrieving revision 1.129
  diff -u -r1.128 -r1.129
  --- httpd.h	2000/12/20 16:43:34	1.128
  +++ httpd.h	2001/01/05 20:44:39	1.129
  @@ -1521,18 +1521,20 @@
   AP_DECLARE(gid_t) ap_gname2id(const char *name);
   /**
    * Given the name of an object in the file system determine if it is a directory
  + * @param p The pool to allocate out of 
    * @param name The name of the object to check
    * @return 1 if it is a directory, 0 otherwise
  - * @deffunc int ap_is_rdirectory(const char *name)
  + * @deffunc int ap_is_rdirectory(apr_pool_t *p, const char *name)
    */
  -AP_DECLARE(int) ap_is_rdirectory(const char *name);
  +AP_DECLARE(int) ap_is_rdirectory(apr_pool_t *p, const char *name);
   /**
    * Given the name of an object in the file system determine if it is a directory - this version is symlink aware
  + * @param p The pool to allocate out of 
    * @param name The name of the object to check
    * @return 1 if it is a directory, 0 otherwise
  - * @deffunc int ap_is_directory(const char *name)
  + * @deffunc int ap_is_directory(apr_pool_t *p, const char *name)
    */
  -AP_DECLARE(int) ap_is_directory(const char *name);
  +AP_DECLARE(int) ap_is_directory(apr_pool_t *p, const char *name);
   /**
    * Given a pathname in file, extract the directory and chdir to that directory
    * @param file The file who's directory we wish to switch to
  
  
  
  1.234     +2 -2      httpd-2.0/modules/http/http_core.c
  
  Index: http_core.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/http/http_core.c,v
  retrieving revision 1.233
  retrieving revision 1.234
  diff -u -r1.233 -r1.234
  --- http_core.c	2001/01/02 01:34:05	1.233
  +++ http_core.c	2001/01/05 20:44:41	1.234
  @@ -1193,7 +1193,7 @@
       }
   
       arg = ap_os_canonical_filename(cmd->pool, arg);
  -    if (/* TODO: ap_configtestonly && ap_docrootcheck && */ !ap_is_directory(arg)) {
  +    if (/* TODO: ap_configtestonly && ap_docrootcheck && */ !ap_is_directory(cmd->pool, arg)) {
   	if (cmd->server->is_virtual) {
   	    ap_log_perror(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, cmd->pool,
                            "Warning: DocumentRoot [%s] does not exist",
  @@ -1994,7 +1994,7 @@
   
       arg = ap_os_canonical_filename(cmd->pool, arg);
   
  -    if (!ap_is_directory(arg)) {
  +    if (!ap_is_directory(cmd->pool, arg)) {
           return "ServerRoot must be a valid directory";
       }
       ap_server_root = arg;
  
  
  
  1.93      +1 -1      httpd-2.0/server/config.c
  
  Index: config.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/config.c,v
  retrieving revision 1.92
  retrieving revision 1.93
  diff -u -r1.92 -r1.93
  --- config.c	2001/01/05 19:40:05	1.92
  +++ config.c	2001/01/05 20:44:43	1.93
  @@ -1369,7 +1369,7 @@
        * horrible loops).  If so, let's recurse and toss it back into
        * the function.
        */
  -    if (ap_is_rdirectory(fname)) {
  +    if (ap_is_rdirectory(ptemp, fname)) {
           apr_dir_t *dirp;
   	int current;
   	apr_array_header_t *candidates = NULL;
  
  
  
  1.89      +4 -4      httpd-2.0/server/util.c
  
  Index: util.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/util.c,v
  retrieving revision 1.88
  retrieving revision 1.89
  diff -u -r1.88 -r1.89
  --- util.c	2001/01/05 14:32:31	1.88
  +++ util.c	2001/01/05 20:44:44	1.89
  @@ -1694,21 +1694,21 @@
       return x;
   }
   
  -AP_DECLARE(int) ap_is_directory(const char *path)
  +AP_DECLARE(int) ap_is_directory(apr_pool_t *p, const char *path)
   {
       apr_finfo_t finfo;
   
  -    if (apr_stat(&finfo, path, NULL) == -1)
  +    if (apr_stat(&finfo, path, p) == -1)
   	return 0;		/* in error condition, just return no */
   
       return (finfo.filetype == APR_DIR);
   }
   
  -AP_DECLARE(int) ap_is_rdirectory(const char *path)
  +AP_DECLARE(int) ap_is_rdirectory(apr_pool_t *p, const char *path)
   {
       apr_finfo_t finfo;
   
  -    if (apr_lstat(&finfo, path, NULL) == -1)
  +    if (apr_lstat(&finfo, path, p) == -1)
   	return 0;		/* in error condition, just return no */
   
       return (finfo.filetype == APR_DIR);
  
  
  

Re: cvs commit: httpd-2.0/server config.c util.c

Posted by Dale Ghent <da...@elemental.org>.
On Fri, 5 Jan 2001, Dale Ghent wrote:

| On 5 Jan 2001 ake@apache.org wrote:
| 
| | ake         01/01/05 12:44:45
| | 
| |   Modified:    include  httpd.h
| |                modules/http http_core.c
| |                server   config.c util.c
| |   Log:
| |   add pool parameter to ap_is_directory and ap_is_rdirectory
| 
| Did this compile for you? It broke on my box:
| 
| config.c: In function `ap_process_resource_config':
| config.c:1372: warning: passing arg 1 of `ap_is_rdirectory' from
| incompatible pointer type

Ok, so a rm of the tree and a re-checkout cleared this up.

sigh. I love you, cvs.

/dale


Re: cvs commit: httpd-2.0/server config.c util.c

Posted by Dale Ghent <da...@elemental.org>.
On 5 Jan 2001 ake@apache.org wrote:

| ake         01/01/05 12:44:45
| 
|   Modified:    include  httpd.h
|                modules/http http_core.c
|                server   config.c util.c
|   Log:
|   add pool parameter to ap_is_directory and ap_is_rdirectory

Did this compile for you? It broke on my box:

config.c: In function `ap_process_resource_config':
config.c:1372: warning: passing arg 1 of `ap_is_rdirectory' from
incompatible pointer type
config.c:1372: too many arguments to function `ap_is_rdirectory'
make[2]: *** [config.lo] Error 1
make[2]: Leaving directory `/local/src/apache-dev/httpd-2.0/server'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/local/src/apache-dev/httpd-2.0/server'
make: *** [all-recursive] Error 1

/dale