Merge per-directory configurations.
This function is supposed to merge two per-directory configurations. We apply a simple inheritance pattern from the parent directory(ies).
- In the absence of a .htaccess in the hierarchy of folders being accessed, #basev contains a freshly created config structure (through create_musicindex_config()) and #addv contains another config struct created through create_musicindex_config(), with the configuration parameters modified by <Directory> directive (if any) set appropriately.
#basev: clean #addv: configured => keep #addv
In the presence of a .htaccess file in the directory being accessed, #basev contains the result of the merging of all "parent" configuration directives (<Directory> being the top ancestor, and any subsquent .htaccess being merged using merge_musicindex_configs()) up to the one in the current directory being accessed, which config options are set in #addv.
#basev: merged #addv: configured => merge
In the presence of a .htaccess anywhere in the parent hierarchy of the directory being accessed BUT in said directory, #basev contains a pristine config structure (as per create_musicindex_config()) and #addv contains the result of merging all parent configuration directives (<Directory> being the top ancestor).
#basev: clean #addv: merged => keep #addv
Hence the logic of this function: if #basev contains init data (data setup in create_musicindex_config()), use #addv element. Otherwise, merge both configs.
|p||Apache pool for memory allocation. |
|basev||Pointer to main configuration structure. |
|addv||Pointer to parent dir configuration structure,|
- The newly created configuration structure.
Definition at line 161 of file config.c.
References apr_pcalloc, CF_CACHE, CF_CKLF, CF_CSS, CF_DPL, CF_FIELDS, CF_ICES, CF_MERGED, CF_ORDER, CF_RSS, CF_TITLE, and default_directory.