mirror of
https://github.com/apache/httpd.git
synced 2026-01-06 09:01:14 +03:00
mod_substitute: follow up to r1687539.
Use tristate single inherit_before variable instead of two, according to wrowe's advices. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1687680 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -57,8 +57,7 @@ typedef struct {
|
||||
apr_array_header_t *patterns;
|
||||
apr_size_t max_line_length;
|
||||
int max_line_length_set;
|
||||
int inherit_before_set,
|
||||
inherit_before;
|
||||
int inherit_before;
|
||||
} subst_dir_conf;
|
||||
|
||||
typedef struct {
|
||||
@@ -76,6 +75,7 @@ static void *create_substitute_dcfg(apr_pool_t *p, char *d)
|
||||
|
||||
dcfg->patterns = apr_array_make(p, 10, sizeof(subst_pattern_t));
|
||||
dcfg->max_line_length = AP_SUBST_MAX_LINE_LENGTH;
|
||||
dcfg->inherit_before = -1;
|
||||
return dcfg;
|
||||
}
|
||||
|
||||
@@ -86,8 +86,8 @@ static void *merge_substitute_dcfg(apr_pool_t *p, void *basev, void *overv)
|
||||
subst_dir_conf *base = (subst_dir_conf *) basev;
|
||||
subst_dir_conf *over = (subst_dir_conf *) overv;
|
||||
|
||||
if (!over->inherit_before_set) {
|
||||
over->inherit_before = base->inherit_before;
|
||||
if (over->inherit_before < 0) {
|
||||
over->inherit_before = (base->inherit_before > 0);
|
||||
}
|
||||
if (over->inherit_before) {
|
||||
a->patterns = apr_array_append(p, base->patterns,
|
||||
@@ -699,7 +699,6 @@ static const char *set_inherit_before(cmd_parms *cmd, void *cfg, int flag)
|
||||
subst_dir_conf *dcfg = (subst_dir_conf *)cfg;
|
||||
|
||||
dcfg->inherit_before = (flag != 0);
|
||||
dcfg->inherit_before_set = 1;
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user