From: Greg Stein Date: Wed, 24 Jan 2001 09:10:15 +0000 (+0000) Subject: Add apr_dbm_get_usednames() so that apr_dbm users can figure out what X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e49e41c6c8075b6a627dfb2d7752c73bc8f97c75;p=apache Add apr_dbm_get_usednames() so that apr_dbm users can figure out what filenames are actually used by the apr_dbm implementation for a given pathname. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87813 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/dav/fs/dbm.c b/modules/dav/fs/dbm.c index 0ede48d9df..e355c848c0 100644 --- a/modules/dav/fs/dbm.c +++ b/modules/dav/fs/dbm.c @@ -80,30 +80,14 @@ struct dav_db { apr_dbm_t *file; }; -/* ### temp */ -#include "apr_sdbm.h" - void dav_dbm_get_statefiles(apr_pool_t *p, const char *fname, const char **state1, const char **state2) { - char *work; - int extension; - if (fname == NULL) fname = DAV_FS_STATE_FILE_FOR_DIR; - fname = apr_pstrcat(p, fname, SDBM_DIRFEXT, NULL); - - *state1 = fname; - - work = apr_pstrdup(p, fname); - - /* we know the extension is 4 characters -- len(DIRFEXT) */ - extension = strlen(work) - 4; - memcpy(&work[extension], SDBM_PAGFEXT, 4); - *state2 = work; - + apr_dbm_get_usednames(p, fname, state1, state2); } static dav_error * dav_fs_dbm_error(dav_db *db, apr_pool_t *p,