httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject cvs commit: httpd-2.0/modules/dav/fs repos.c
Date Thu, 24 Jan 2002 17:04:42 GMT
wrowe       02/01/24 09:04:42

  Modified:    modules/dav/fs repos.c
  Log:
    The clean solution.
  
    Divorce dav_fs from the DAV_PROPID_FS_executable property at the
    very head of this module, and drop all references as soon as we
    determine that 'our property' isn't supported.
  
  Revision  Changes    Path
  1.61      +16 -11    httpd-2.0/modules/dav/fs/repos.c
  
  Index: repos.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/dav/fs/repos.c,v
  retrieving revision 1.60
  retrieving revision 1.61
  diff -u -r1.60 -r1.61
  --- repos.c	24 Jan 2002 15:27:46 -0000	1.60
  +++ repos.c	24 Jan 2002 17:04:42 -0000	1.61
  @@ -154,8 +154,12 @@
   
   /*
   ** The single property that we define (in the DAV_FS_URI_MYPROPS namespace)
  +** XXX this property is not usable (readable/writable) on all platforms
  +** Need an abstract way to determine this.
   */
  +#ifdef UNIX
   #define DAV_PROPID_FS_executable        1
  +#endif
   
   static const dav_liveprop_spec dav_fs_props[] =
   {
  @@ -183,14 +187,14 @@
           DAV_PROPID_getlastmodified,
           0
       },
  -
  +#ifdef DAV_PROPID_FS_executable
       {
           DAV_FS_URI_MYPROPS,
           "executable",
           DAV_PROPID_FS_executable,
           0       /* handled special in dav_fs_is_writable */
       },
  -
  +#endif
       { 0 }	/* sentinel */
   };
   
  @@ -1853,7 +1857,7 @@
                           buf);
   	value = buf;
   	break;
  -
  +#ifdef DAV_PROPID_FS_executable
       case DAV_PROPID_FS_executable:
   	/* our property, but not defined on collection resources */
   	if (resource->collection)
  @@ -1869,7 +1873,7 @@
   	else
   	    value = "F";
   	break;
  -
  +#endif
       default:
           /* ### what the heck was this property? */
   	return DAV_PROP_INSERT_NOTDEF;
  @@ -1904,13 +1908,12 @@
       return what;
   }
   
  +#ifdef DAV_PROPID_FS_executable
  +
   static int dav_fs_is_writable(const dav_resource *resource, int propid)
   {
       const dav_liveprop_spec *info;
   
  -    /* XXX this property is not usable (writable) on all platforms
  -     * Need an abstract way to determine this.
  -     */
       if (propid == DAV_PROPID_FS_executable && !resource->collection)
   	return 1;
   
  @@ -2053,7 +2056,6 @@
       return NULL;
   }
   
  -
   static const dav_hooks_liveprop dav_hooks_liveprop_fs =
   {
       dav_fs_insert_prop,
  @@ -2065,6 +2067,8 @@
       dav_fs_patch_rollback
   };
   
  +#endif /* DAV_PROPID_FS_executable */
  +
   static const dav_provider dav_fs_provider =
   {
       &dav_hooks_repository_fs,
  @@ -2076,11 +2080,10 @@
   
   void dav_fs_gather_propsets(apr_array_header_t *uris)
   {
  -    /* XXX: Need an abstract way to determine this on a per-filesystem basis
  -     * This may change by uri (!) (think OSX HFS + unix mounts).
  -     */
  +#ifdef DAV_PROPID_FS_executable
       *(const char **)apr_array_push(uris) =
           "<http://apache.org/dav/propset/fs/1>";
  +#endif
   }
   
   int dav_fs_find_liveprop(const dav_resource *resource,
  @@ -2118,8 +2121,10 @@
   			      what, phdr);
       (void) dav_fs_insert_prop(resource, DAV_PROPID_getetag,
   			      what, phdr);
  +#ifdef DAV_PROPID_FS_executable
       (void) dav_fs_insert_prop(resource, DAV_PROPID_FS_executable,
   			      what, phdr);
  +#endif
   
       /* ### we know the others aren't defined as liveprops */
   }
  
  
  

Mime
View raw message