[prev in list] [next in list] [prev in thread] [next in thread]
List: dav-cvs
Subject: [dav-checkins] CVS: mod_dav dav_props.c
From: Greg Stein (CVS user) <gjscvs () nebula ! lyra ! org>
Date: 2000-05-25 9:48:12
[Download RAW message or body]
gjscvs 00/05/25 02:48:12
Modified: . dav_props.c
Log:
delay creation of the dead-prop database. if the PROPPATCH is only affecting
live properties, then we don't want to needlessly create dead-prop
databases.
Revision Changes Path
1.67 +16 -5 mod_dav/dav_props.c
Index: dav_props.c
===================================================================
RCS file: /home/cvsroot/mod_dav/dav_props.c,v
retrieving revision 1.66
retrieving revision 1.67
diff -u -r1.66 -r1.67
--- dav_props.c 2000/05/25 09:37:11 1.66
+++ dav_props.c 2000/05/25 09:48:12 1.67
@@ -830,9 +830,7 @@
return key;
}
-dav_error *dav_really_open_db(const dav_resource *resource,
- int ro,
- dav_propdb *propdb)
+dav_error *dav_really_open_db(dav_propdb *propdb, int ro)
{
dav_error *err;
dav_datum key;
@@ -842,7 +840,8 @@
propdb->deferred = 0;
/* ask the DB provider to open the thing */
- err = (*propdb->db_hooks->open)(propdb->p, resource, ro, &propdb->db);
+ err = (*propdb->db_hooks->open)(propdb->p, propdb->resource, ro,
+ &propdb->db);
if (err != NULL) {
return dav_push_error(propdb->p, HTTP_INTERNAL_SERVER_ERROR,
DAV_ERR_PROP_OPENING,
@@ -945,7 +944,10 @@
propdb->lockdb = lockdb;
- if ((err = dav_really_open_db(resource, ro, propdb)) != NULL) {
+ if (!ro) {
+ propdb->deferred = 1;
+ }
+ else if ((err = dav_really_open_db(propdb, 1 /* ro */)) != NULL) {
return err;
}
@@ -1348,6 +1350,15 @@
/* clear is_liveprop -- act as a dead prop now */
ctx->is_liveprop = 0;
+ }
+
+ /*
+ ** The property is supposed to be stored into the dead-property
+ ** database. Make sure the thing is truly open (and writeable).
+ */
+ if (propdb->deferred
+ && (ctx->err = dav_really_open_db(propdb, 0 /* ro */)) != NULL) {
+ return;
}
/*
_______________________________________________
dav-checkins maillist - dav-checkins@lyra.org
http://dav.lyra.org/mailman/listinfo/dav-checkins
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic