old file if the transfer aborted. PR 39815. [Paul Querna, Stefan Fritsch]
*) mod_dav_fs: Remove inode keyed locking as this conflicts with atomically
- creating files. This is a format cange of the DavLockDB. The old
- DavLockDB must be deleted on upgrade. [Stefan Fritsch]
+ creating files. On systems with inode numbers, this is a format cange of
+ the DavLockDB. The old DavLockDB must be deleted on upgrade.
+ [Stefan Fritsch]
*) mod_log_config: Make ${cookie}C correctly match whole cookie names
instead of substrings. PR 28037. [Dan Franklin <dan dan-franklin.com>,
**
** KEY
**
-** The database is keyed by the full path.
+** The database is keyed by a key_type unsigned char (DAV_TYPE_FNAME)
+** followed by the full path. The key_type DAV_TYPE_INODE is not used anymore.
**
** VALUE
**
#define DAV_LOCK_DIRECT 1
#define DAV_LOCK_INDIRECT 2
+/*
+ * not used anymore
+ * #define DAV_TYPE_INODE 10
+ */
+#define DAV_TYPE_FNAME 11
+
/* ack. forward declare. */
static dav_error * dav_fs_remove_locknull_member(apr_pool_t *p,
/* ### does this allocation have a proper lifetime? need to check */
/* ### can we use a buffer for this? */
- key.dsize = strlen(pathname) + 1;
- key.dptr = apr_pstrmemdup(p, pathname, key.dsize - 1);
+ /* size is TYPE + pathname + null */
+ key.dsize = strlen(pathname) + 2;
+ key.dptr = apr_palloc(p, key.dsize);
+ *key.dptr = DAV_TYPE_FNAME;
+ memcpy(key.dptr + 1, pathname, key.dsize - 1);
if (key.dptr[key.dsize - 2] == '/')
key.dptr[--key.dsize - 1] = '\0';
return key;
need_save = DAV_TRUE;
/* Remove timed-out locknull fm .locknull list */
- {
+ if (*key.dptr == DAV_TYPE_FNAME) {
+ const char *fname = key.dptr + 1;
apr_finfo_t finfo;
apr_status_t rv;
/* if we don't see the file, then it's a locknull */
- rv = apr_stat(&finfo, key.dptr, APR_FINFO_MIN | APR_FINFO_LINK, p);
+ rv = apr_stat(&finfo, fname, APR_FINFO_MIN | APR_FINFO_LINK, p);
if (rv != APR_SUCCESS && rv != APR_INCOMPLETE) {
- if ((err = dav_fs_remove_locknull_member(p, key.dptr, &buf)) != NULL) {
+ if ((err = dav_fs_remove_locknull_member(p, fname, &buf)) != NULL) {
/* ### push a higher-level description? */
return err;
}