summaryrefslogtreecommitdiff
path: root/src/mod_cml.c
diff options
context:
space:
mode:
authorJan Kneschke <jan@kneschke.de>2005-08-08 10:27:07 +0000
committerJan Kneschke <jan@kneschke.de>2005-08-08 10:27:07 +0000
commitc8408d015cfb2ecf01082f2dd0fa7ea99e5f505d (patch)
tree36ae9983efbe783a9c35630dfc44774459b7c0ec /src/mod_cml.c
parent5c26d86fd24c8db56d3f99ff3884359f8229b7ca (diff)
downloadlighttpd-git-c8408d015cfb2ecf01082f2dd0fa7ea99e5f505d.tar.gz
removed setup_connection (merged [295])
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-merge-1.4.x@512 152afb58-edef-0310-8abb-c4023f1b3aa9
Diffstat (limited to 'src/mod_cml.c')
-rw-r--r--src/mod_cml.c36
1 files changed, 10 insertions, 26 deletions
diff --git a/src/mod_cml.c b/src/mod_cml.c
index 89bfb862..99458107 100644
--- a/src/mod_cml.c
+++ b/src/mod_cml.c
@@ -135,16 +135,20 @@ SETDEFAULTS_FUNC(mod_cml_set_defaults) {
#define PATCH(x) \
p->conf.x = s->x;
-static int mod_cml_patch_connection(server *srv, connection *con, plugin_data *p, const char *stage, size_t stage_len) {
+static int mod_cml_patch_connection(server *srv, connection *con, plugin_data *p) {
size_t i, j;
+ plugin_config *s = p->config_storage[0];
+
+ PATCH(ext);
+#if defined(HAVE_MEMCACHE_H)
+ PATCH(mc);
+#endif
+ PATCH(mc_namespace);
/* skip the first, the global context */
for (i = 1; i < srv->config_context->used; i++) {
data_config *dc = (data_config *)srv->config_context->data[i];
- plugin_config *s = p->config_storage[i];
-
- /* not our stage */
- if (!buffer_is_equal_string(dc->comp_key, stage, stage_len)) continue;
+ s = p->config_storage[i];
/* condition didn't match */
if (!config_check_cond(srv, con, dc)) continue;
@@ -167,20 +171,6 @@ static int mod_cml_patch_connection(server *srv, connection *con, plugin_data *p
return 0;
}
-
-static int mod_cml_setup_connection(server *srv, connection *con, plugin_data *p) {
- plugin_config *s = p->config_storage[0];
- UNUSED(srv);
- UNUSED(con);
-
- PATCH(ext);
-#if defined(HAVE_MEMCACHE_H)
- PATCH(mc);
-#endif
- PATCH(mc_namespace);
-
- return 0;
-}
#undef PATCH
@@ -313,17 +303,11 @@ URIHANDLER_FUNC(mod_cml_is_handled) {
char *c;
buffer *fn = con->physical.path;
plugin_data *p = p_d;
- size_t i;
int ret;
if (fn->used == 0) return HANDLER_ERROR;
- mod_cml_setup_connection(srv, con, p);
- for (i = 0; i < srv->config_patches->used; i++) {
- buffer *patch = srv->config_patches->ptr[i];
-
- mod_cml_patch_connection(srv, con, p, CONST_BUF_LEN(patch));
- }
+ mod_cml_patch_connection(srv, con, p);
buffer_reset(p->basedir);
buffer_reset(p->baseurl);