httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gst...@apache.org
Subject cvs commit: httpd-2.0/modules/dav/main mod_dav.c mod_dav.h props.c std_liveprop.c
Date Sat, 20 Jan 2001 11:29:36 GMT
gstein      01/01/20 03:29:35

  Modified:    modules/dav/fs repos.c
               modules/dav/main mod_dav.c mod_dav.h props.c std_liveprop.c
  Log:
  some stylistic tweaks post- John's patch
  
  Revision  Changes    Path
  1.43      +6 -5      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.42
  retrieving revision 1.43
  diff -u -u -r1.42 -r1.43
  --- repos.c	2001/01/20 02:00:00	1.42
  +++ repos.c	2001/01/20 11:29:34	1.43
  @@ -1814,8 +1814,9 @@
       }
       else {
           /* assert: what == DAV_PROP_INSERT_SUPPORTED */
  -        s = apr_psprintf(p, "<supported-live-property name=\"%s\""
  -                            " namespace=\"%s\" xmlns=\"DAV:\"/>" DEBUG_CR,
  +        s = apr_psprintf(p,
  +                         "<D:supported-live-property D:name=\"%s\" "
  +                         "D:namespace=\"%s\"/>" DEBUG_CR,
                            info->name, dav_fs_namespace_uris[info->ns]);
       }
       ap_text_append(p, phdr, s);
  @@ -1903,7 +1904,7 @@
   
   }
   
  -static dav_error *dav_fs_patch_exec(dav_resource *resource,
  +static dav_error *dav_fs_patch_exec(const dav_resource *resource,
   				    const ap_xml_elem *elem,
   				    int operation,
   				    void *context,
  @@ -1938,7 +1939,7 @@
       return NULL;
   }
   
  -static void dav_fs_patch_commit(dav_resource *resource,
  +static void dav_fs_patch_commit(const dav_resource *resource,
   				int operation,
   				void *context,
   				dav_liveprop_rollback *rollback_ctx)
  @@ -1946,7 +1947,7 @@
       /* nothing to do */
   }
   
  -static dav_error *dav_fs_patch_rollback(dav_resource *resource,
  +static dav_error *dav_fs_patch_rollback(const dav_resource *resource,
   					int operation,
   					void *context,
   					dav_liveprop_rollback *rollback_ctx)
  
  
  
  1.39      +14 -12    httpd-2.0/modules/dav/main/mod_dav.c
  
  Index: mod_dav.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/dav/main/mod_dav.c,v
  retrieving revision 1.38
  retrieving revision 1.39
  diff -u -u -r1.38 -r1.39
  --- mod_dav.c	2001/01/20 02:00:01	1.38
  +++ mod_dav.c	2001/01/20 11:29:34	1.39
  @@ -1342,14 +1342,14 @@
       if ((err = dav_open_lockdb(r, 0, &lockdb)) != NULL) {
   	return dav_push_error(r->pool, err->status, 0,
   			      "The lock database could not be opened, "
  -			      "preventing report of supported lock properties.",
  +			      "preventing the reporting of supported lock "
  +                              "properties.",
   			      err);
       }
   
       /* open the property database (readonly) for the resource */
  -    if ((err = dav_open_propdb(r, lockdb,
  -			       (dav_resource *)resource, 1,
  -                               NULL, &propdb)) != NULL) {
  +    if ((err = dav_open_propdb(r, lockdb, resource, 1, NULL,
  +                               &propdb)) != NULL) {
           if (lockdb != NULL)
               (*lockdb->hooks->close_lockdb)(lockdb);
   
  @@ -1388,8 +1388,9 @@
   
                   if (name == NULL) {
                       err = dav_new_error(r->pool, HTTP_BAD_REQUEST, 0,
  -                                        "A DAV:supported-live-property element "
  -                                        "does not have a \"name\" attribute");
  +                                        "A DAV:supported-live-property "
  +                                        "element does not have a \"name\" "
  +                                        "attribute");
                       break;
                   }
   
  @@ -1433,10 +1434,10 @@
   
           if ((err = (*vsn_hooks->avail_reports)(resource, &reports)) != NULL) {
   	    return dav_push_error(r->pool, err->status, 0,
  -			         "DAV:supported-report-set could not be determined "
  -                                 "due to a problem fetching the available reports "
  -                                 "for this resource.",
  -			         err);
  +                                  "DAV:supported-report-set could not be "
  +                                  "determined due to a problem fetching the "
  +                                  "available reports for this resource.",
  +                                  err);
           }
   
           if (reports != NULL) {
  @@ -1664,6 +1665,8 @@
           }
           else if (resource->working) {
               apr_table_addn(methods, "CHECKIN", "");
  +
  +            /* ### we might not support this DeltaV option */
               apr_table_addn(methods, "UNCHECKOUT", "");
           }
           else if (vsn_hooks->add_label != NULL) {
  @@ -1819,8 +1822,7 @@
       ** Note: we cast to lose the "const". The propdb won't try to change
       ** the resource, however, since we are opening readonly.
       */
  -    err = dav_open_propdb(ctx->r, ctx->w.lockdb,
  -			  (dav_resource *)wres->resource, 1,
  +    err = dav_open_propdb(ctx->r, ctx->w.lockdb, wres->resource, 1,
   			  ctx->doc ? ctx->doc->namespaces : NULL, &propdb);
       if (err != NULL) {
   	/* ### do something with err! */
  
  
  
  1.38      +10 -10    httpd-2.0/modules/dav/main/mod_dav.h
  
  Index: mod_dav.h
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/dav/main/mod_dav.h,v
  retrieving revision 1.37
  retrieving revision 1.38
  diff -u -u -r1.37 -r1.38
  --- mod_dav.h	2001/01/20 02:00:01	1.37
  +++ mod_dav.h	2001/01/20 11:29:34	1.38
  @@ -497,8 +497,8 @@
   				   resource (it may be present as a dead
   				   property). */
       DAV_PROP_INSERT_NOTSUPP,    /* property is recognized by this provider,
  -                                 * but it is not supported, and cannot be
  -                                 * treated as a dead property */
  +                                   but it is not supported, and cannot be
  +                                   treated as a dead property */
       DAV_PROP_INSERT_NAME,	/* a property name (empty elem) was
   				   inserted into the text block */
       DAV_PROP_INSERT_VALUE,	/* a property name/value pair was inserted
  @@ -707,10 +707,10 @@
       **      a DAV:supported-live-property element, as defined
       **      by the DeltaV extensions to RFC2518.
       **                      
  -    ** Providers should return DAV_PROP_INSERT_NOTDEF if they do not define
  -    ** the specified propid, but allow the property to be handled as a
  -    ** dead property. If a provider recognizes, but does not support,
  -    ** a property, and does not want it handled as a dead property, it should
  +    ** Providers should return DAV_PROP_INSERT_NOTDEF if the property is
  +    ** known and not defined for this resource, so should be handled as a
  +    ** dead property. If a provider recognizes, but does not support, a
  +    ** property, and does not want it handled as a dead property, it should
       ** return DAV_PROP_INSERT_NOTSUPP.
       **
       ** Returns one of DAV_PROP_INSERT_* based on what happened.
  @@ -778,20 +778,20 @@
   				  int *defer_to_dead);
   
       /* ### doc... */
  -    dav_error * (*patch_exec)(dav_resource *resource,
  +    dav_error * (*patch_exec)(const dav_resource *resource,
   			      const ap_xml_elem *elem,
   			      int operation,
   			      void *context,
   			      dav_liveprop_rollback **rollback_ctx);
   
       /* ### doc... */
  -    void (*patch_commit)(dav_resource *resource,
  +    void (*patch_commit)(const dav_resource *resource,
   			 int operation,
   			 void *context,
   			 dav_liveprop_rollback *rollback_ctx);
   
       /* ### doc... */
  -    dav_error * (*patch_rollback)(dav_resource *resource,
  +    dav_error * (*patch_rollback)(const dav_resource *resource,
   				  int operation,
   				  void *context,
   				  dav_liveprop_rollback *rollback_ctx);
  @@ -1355,7 +1355,7 @@
   dav_error *dav_open_propdb(
       request_rec *r,
       dav_lockdb *lockdb,
  -    dav_resource *resource,
  +    const dav_resource *resource,
       int ro,
       apr_array_header_t *ns_xlate,
       dav_propdb **propdb);
  
  
  
  1.23      +6 -3      httpd-2.0/modules/dav/main/props.c
  
  Index: props.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/dav/main/props.c,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -u -r1.22 -r1.23
  --- props.c	2001/01/20 02:00:01	1.22
  +++ props.c	2001/01/20 11:29:35	1.23
  @@ -250,7 +250,7 @@
       apr_pool_t *p;		/* the pool we should use */
       request_rec *r;		/* the request record */
   
  -    dav_resource *resource;	/* the target resource */
  +    const dav_resource *resource;	/* the target resource */
   
       int deferred;		/* open of db has been deferred */
       dav_db *db;			/* underlying database containing props */
  @@ -375,6 +375,8 @@
   
       priv->propid = dav_find_liveprop_provider(propdb, ns_uri, elem->name,
                                                 &hooks);
  +
  +    /* ### this test seems redundant... */
       if (priv->propid != DAV_PROPID_CORE_UNKNOWN) {
           priv->provider = hooks;
       }
  @@ -921,7 +923,7 @@
   }
   
   dav_error *dav_open_propdb(request_rec *r, dav_lockdb *lockdb,
  -			   dav_resource *resource,
  +			   const dav_resource *resource,
   			   int ro,
   			   apr_array_header_t * ns_xlate,
   			   dav_propdb **p_propdb)
  @@ -1228,7 +1230,8 @@
           }
   
   	/*
  -	** If not handled as a live property, look in the dead property database
  +	** If not handled as a live property, look in the dead property
  +        ** database.
   	*/
           if (!is_liveprop) {
               /* make sure propdb is really open */
  
  
  
  1.5       +4 -3      httpd-2.0/modules/dav/main/std_liveprop.c
  
  Index: std_liveprop.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/dav/main/std_liveprop.c,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -u -r1.4 -r1.5
  --- std_liveprop.c	2001/01/20 02:00:01	1.4
  +++ std_liveprop.c	2001/01/20 11:29:35	1.5
  @@ -160,11 +160,12 @@
       /* assert: info != NULL && info->name != NULL */
   
       if (what == DAV_PROP_INSERT_SUPPORTED) {
  -        s = apr_psprintf(p, "<supported-live-property name=\"%s\""
  -                            " namespace=\"%s\" xmlns=\"DAV:\"/>" DEBUG_CR,
  +        s = apr_psprintf(p,
  +                         "<D:supported-live-property D:name=\"%s\" "
  +                         "D:namespace=\"%s\"/>" DEBUG_CR,
                            info->name, dav_core_namespace_uris[info->ns]);
       }
  -	else if (what == DAV_PROP_INSERT_VALUE && *value != '\0') {
  +    else if (what == DAV_PROP_INSERT_VALUE && *value != '\0') {
           s = apr_psprintf(p, "<lp%d:%s>%s</lp%d:%s>" DEBUG_CR,
                            global_ns, info->name, value, global_ns, info->name);
       }
  
  
  

Mime
View raw message