summaryrefslogtreecommitdiff
path: root/src/mod_access.c
diff options
context:
space:
mode:
authorStefan Bühler <stbuehler@web.de>2015-11-07 12:51:11 +0000
committerStefan Bühler <stbuehler@web.de>2015-11-07 12:51:11 +0000
commitc512345fa2830b7e0f4fe67ab626e9d9ba0644c4 (patch)
tree880a9ba7e3545b21b25b8425868228782f21993e /src/mod_access.c
parent39add4476f5daba3e3e2d99fdd382c66d1d7c834 (diff)
downloadlighttpd1.4-c512345fa2830b7e0f4fe67ab626e9d9ba0644c4.tar.gz
lighttpd1.4-c512345fa2830b7e0f4fe67ab626e9d9ba0644c4.zip
[config] check config option scope; warn if server option is given in conditional
From: Stefan Bühler <stbuehler@web.de> git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@3049 152afb58-edef-0310-8abb-c4023f1b3aa9
Diffstat (limited to 'src/mod_access.c')
-rw-r--r--src/mod_access.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mod_access.c b/src/mod_access.c
index e6a9a14f..4e7a349a 100644
--- a/src/mod_access.c
+++ b/src/mod_access.c
@@ -66,6 +66,7 @@ SETDEFAULTS_FUNC(mod_access_set_defaults) {
p->config_storage = calloc(1, srv->config_context->used * sizeof(plugin_config *));
for (i = 0; i < srv->config_context->used; i++) {
+ data_config const* config = (data_config const*)srv->config_context->data[i];
plugin_config *s;
s = calloc(1, sizeof(plugin_config));
@@ -75,7 +76,7 @@ SETDEFAULTS_FUNC(mod_access_set_defaults) {
p->config_storage[i] = s;
- if (0 != config_insert_values_global(srv, ((data_config *)srv->config_context->data[i])->value, cv)) {
+ if (0 != config_insert_values_global(srv, config->value, cv, i == 0 ? T_CONFIG_SCOPE_SERVER : T_CONFIG_SCOPE_CONNECTION)) {
return HANDLER_ERROR;
}
}