You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by gs...@locus.apache.org on 2000/07/10 06:16:51 UTC
cvs commit: apache-2.0/src/modules/dav/main config.m4 mod_dav.c mod_dav.h props.c dav_dyn.c
gstein 00/07/09 21:16:51
Modified: src/modules/dav/fs repos.c
src/modules/dav/main config.m4 mod_dav.c mod_dav.h props.c
Removed: src/modules/dav/main dav_dyn.c
Log:
torch just about all of the old dav_dyn stuff. temporarily hard-wire the
liveprop provider setup. this will go away momentarily (another pass).
Revision Changes Path
1.13 +8 -18 apache-2.0/src/modules/dav/fs/repos.c
Index: repos.c
===================================================================
RCS file: /home/cvs/apache-2.0/src/modules/dav/fs/repos.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- repos.c 2000/07/10 03:18:13 1.12
+++ repos.c 2000/07/10 04:16:50 1.13
@@ -1684,7 +1684,6 @@
static dav_prop_insert dav_fs_insert_prop(const dav_resource *resource,
int propid, int insvalue,
- const int *ns_map,
ap_text_header *phdr)
{
const char *value;
@@ -1784,8 +1783,7 @@
/* assert: scan->name != NULL */
- /* map our NS index into a global NS index */
- /* ns = ns_map[scan->ns]; */
+ /* map our namespace into a global NS index */
ns = dav_get_liveprop_ns_index(dav_fs_namespace_uris[scan->ns]);
/* DBG3("FS: inserting lp%d:%s (local %d)", ns, scan->name, scan->ns); */
@@ -1808,7 +1806,7 @@
}
static void dav_fs_insert_all(const dav_resource *resource, int insvalue,
- const int *ns_map, ap_text_header *phdr)
+ ap_text_header *phdr)
{
if (!resource->exists) {
/* a lock-null resource */
@@ -1821,13 +1819,13 @@
}
(void) dav_fs_insert_prop(resource, DAV_PROPID_FS_creationdate,
- insvalue, ns_map, phdr);
+ insvalue, phdr);
(void) dav_fs_insert_prop(resource, DAV_PROPID_FS_getcontentlength,
- insvalue, ns_map, phdr);
+ insvalue, phdr);
(void) dav_fs_insert_prop(resource, DAV_PROPID_FS_getlastmodified,
- insvalue, ns_map, phdr);
+ insvalue, phdr);
(void) dav_fs_insert_prop(resource, DAV_PROPID_FS_getetag,
- insvalue, ns_map, phdr);
+ insvalue, phdr);
#ifndef WIN32
/*
@@ -1836,7 +1834,7 @@
** well not even call it.
*/
(void) dav_fs_insert_prop(resource, DAV_PROPID_FS_executable,
- insvalue, ns_map, phdr);
+ insvalue, phdr);
#endif
/* ### we know the others aren't defined as liveprops */
@@ -2025,8 +2023,7 @@
{
DAV_FS_PROVIDER_ID,
DAV_DYN_TYPE_LIVEPROP,
- &dav_hooks_liveprop_fs,
- NULL
+ &dav_hooks_liveprop_fs
},
/* must always be last */
@@ -2038,13 +2035,6 @@
DAV_DYN_MAGIC,
DAV_DYN_VERSION,
"filesystem",
-
- NULL, /* module_open */
- NULL, /* module_close */
- NULL, /* dir_open */
- NULL, /* dir_param */
- NULL, /* dir_merge */
- NULL, /* dir_close */
dav_dyn_providers_fs
};
1.6 +1 -1 apache-2.0/src/modules/dav/main/config.m4
Index: config.m4
===================================================================
RCS file: /home/cvs/apache-2.0/src/modules/dav/main/config.m4,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- config.m4 2000/07/10 03:18:13 1.5
+++ config.m4 2000/07/10 04:16:50 1.6
@@ -3,7 +3,7 @@
APACHE_MODPATH_INIT(dav/main)
APACHE_MODULE(dav, WebDAV protocol handling,
- mod_dav.lo props.lo util.lo util_lock.lo opaquelock.lo dav_dyn.lo
+ mod_dav.lo props.lo util.lo util_lock.lo opaquelock.lo
liveprop.lo
, , no)
1.11 +12 -32 apache-2.0/src/modules/dav/main/mod_dav.c
Index: mod_dav.c
===================================================================
RCS file: /home/cvs/apache-2.0/src/modules/dav/main/mod_dav.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- mod_dav.c 2000/07/08 13:22:13 1.10
+++ mod_dav.c 2000/07/10 04:16:50 1.11
@@ -135,40 +135,22 @@
/* copy a module's providers into our per-directory configuration state */
static void dav_copy_providers(ap_pool_t *p, const char *name, dav_dir_conf *conf)
{
+ extern const dav_dyn_module dav_dyn_module_default;
+
const dav_dyn_module *mod;
const dav_dyn_provider *provider;
- dav_dyn_hooks hooks;
- void *ctx;
+ dav_dyn_hooks *ddh;
+
+ /* ### just hard-code this stuff for now */
- mod = dav_find_module(name);
- /* ### if NULL? need to error out somehow... */
+ /* mod = dav_find_module(name); */
+ mod = &dav_dyn_module_default;
- /* Set hooks for any providers in the module */
- ctx = dav_prepare_scan(p, mod);
- if (ctx == NULL) {
- /* ### how to signal an error? */
- return;
- }
-
- while (!dav_scan_providers(ctx, &provider, &hooks)) {
-
- switch (provider->type) {
-
- case DAV_DYN_TYPE_LIVEPROP:
- {
- dav_dyn_hooks *ddh = ap_palloc(p, sizeof(*ddh));
-
- *ddh = hooks;
- ddh->next = conf->liveprop;
- conf->liveprop = ddh;
- break;
- }
-
- default:
- /* ### need to error out somehow... */
- break;
- }
- }
+ provider = mod->providers;
+
+ ddh = ap_pcalloc(p, sizeof(*ddh));
+ ddh->hooks = provider->hooks;
+ conf->liveprop = ddh;
}
static void dav_init_handler(ap_pool_t *p, ap_pool_t *plog, ap_pool_t *ptemp,
@@ -177,8 +159,6 @@
/* DBG0("dav_init_handler"); */
ap_add_version_component(p, "DAV/" DAV_VERSION);
-
- dav_process_builtin_modules(p);
}
static void *dav_create_server_config(ap_pool_t *p, server_rec *s)
1.12 +6 -53 apache-2.0/src/modules/dav/main/mod_dav.h
Index: mod_dav.h
===================================================================
RCS file: /home/cvs/apache-2.0/src/modules/dav/main/mod_dav.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- mod_dav.h 2000/07/10 03:18:13 1.11
+++ mod_dav.h 2000/07/10 04:16:51 1.12
@@ -385,11 +385,14 @@
/* ### docco ... */
+/* ### add a repository friendly-name to the get_resource */
AP_DECLARE_HOOK(int, get_resource, (request_rec *r, const char *root_dir,
const char *workspace))
+
AP_DECLARE_HOOK(const dav_hooks_locks *, get_lock_hooks, (request_rec *r))
AP_DECLARE_HOOK(const dav_hooks_propdb *, get_propdb_hooks, (request_rec *r))
AP_DECLARE_HOOK(const dav_hooks_vsn *, get_vsn_hooks, (request_rec *r))
+
AP_DECLARE_HOOK(int, find_liveprop, (request_rec *r,
const char *ns_uri, const char *name,
const dav_hooks_liveprop **hooks))
@@ -424,23 +427,6 @@
/*
-** This structure is used to define the runtime, per-directory/location
-** operating context for a single provider.
-*/
-typedef struct
-{
- int id; /* provider ID */
-
- void *m_context; /* module-level context (i.e. managed globals) */
-
- void *d_context; /* per-directory context */
- ap_table_t *d_params; /* per-directory DAV config parameters */
-
- int *ns_map; /* for LIVEPROP, map provider URI to global URI */
-
-} dav_dyn_context;
-
-/*
** This structure is used to specify a set of hooks and its associated
** context, on a per-directory/location basis.
**
@@ -450,7 +436,6 @@
*/
typedef struct dav_dyn_hooks
{
- dav_dyn_context ctx; /* context for this set of hooks */
const void *hooks; /* the type-specific hooks */
struct dav_dyn_hooks *next; /* next set of hooks, if applicable */
@@ -499,11 +484,9 @@
int type; /* provider's functionality type */
const void *hooks; /* pointer to type-specific hooks */
- int (*is_active)(dav_dyn_context *ctx, int id);
-
} dav_dyn_provider;
-#define DAV_DYN_END_MARKER { 0, DAV_DYN_TYPE_SENTINEL, NULL, NULL }
+#define DAV_DYN_END_MARKER { 0, DAV_DYN_TYPE_SENTINEL, NULL }
/*
** This structure defines a module (a set of providers).
@@ -534,39 +517,10 @@
const char *name; /* friendly name */
- int (*module_open)(dav_dyn_context *ctx);
- int (*module_close)(dav_dyn_context *ctx);
-
- int (*dir_open)(dav_dyn_context *ctx);
- int (*dir_param)(dav_dyn_context *ctx, const char *param_name,
- const char *param_value);
- int (*dir_merge)(dav_dyn_context *base, dav_dyn_context *overrides,
- dav_dyn_context *result);
- int (*dir_close)(dav_dyn_context *ctx);
-
const dav_dyn_provider *providers; /* providers in this module */
} dav_dyn_module;
-int dav_load_module(const char *name, const char *module_sym,
- const char *filename);
-const dav_dyn_module *dav_find_module(const char *name);
-
-/*
-** Various management functions.
-**
-** NOTE: the pool should be the "configuration pool"
-*/
-void dav_process_builtin_modules(ap_pool_t *p);
-void dav_process_module(ap_pool_t *p, const dav_dyn_module *mod);
-
-int * dav_collect_liveprop_uris(ap_pool_t *p, const dav_hooks_liveprop *hooks);
-
-void *dav_prepare_scan(ap_pool_t *p, const dav_dyn_module *mod);
-int dav_scan_providers(void *ctx,
- const dav_dyn_provider **provider,
- dav_dyn_hooks *output);
-
/* ### deprecated */
#define DAV_GET_HOOKS_PROPDB(r) dav_get_propdb_hooks(r)
#define DAV_GET_HOOKS_LOCKS(r) dav_get_lock_hooks(r)
@@ -711,7 +665,7 @@
*/
dav_prop_insert (*insert_prop)(const dav_resource *resource,
int propid, int insvalue,
- const int *ns_map, ap_text_header *phdr);
+ ap_text_header *phdr);
/*
** Insert all known/defined property names (and values). This is
@@ -719,7 +673,7 @@
** rather than specific, individual properties.
*/
void (*insert_all)(const dav_resource *resource, int insvalue,
- const int *ns_map, ap_text_header *phdr);
+ ap_text_header *phdr);
/*
** Determine whether a given property is writeable.
@@ -1714,7 +1668,6 @@
typedef struct {
int propid; /* live property ID */
const dav_hooks_liveprop *provider; /* the provider defining this prop */
- const int *ns_map; /* ns map for this provider */
} dav_elem_private;
#ifdef __cplusplus
1.9 +1 -3 apache-2.0/src/modules/dav/main/props.c
Index: props.c
===================================================================
RCS file: /home/cvs/apache-2.0/src/modules/dav/main/props.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- props.c 2000/07/10 03:18:14 1.8
+++ props.c 2000/07/10 04:16:51 1.9
@@ -353,7 +353,6 @@
if (propid != 0) {
priv->propid = propid;
priv->provider = DAV_AS_HOOKS_LIVEPROP(ddh);
- priv->ns_map = ddh->ctx.ns_map;
return;
}
}
@@ -568,7 +567,7 @@
/* ask the provider (that defined this prop) to insert the prop */
pi = (*priv->provider->insert_prop)(propdb->resource, priv->propid,
- getvals, priv->ns_map, phdr);
+ getvals, phdr);
#if DAV_DEBUG
if (pi == DAV_PROP_INSERT_NOTME) {
/* ### the provider should have returned NOTDEF, at least */
@@ -1127,7 +1126,6 @@
/* ask the liveprop providers to insert their properties */
for (ddh = propdb->liveprop; ddh != NULL; ddh = ddh->next) {
(*DAV_AS_HOOKS_LIVEPROP(ddh)->insert_all)(propdb->resource, getvals,
- ddh->ctx.ns_map,
&hdr);
}