Hi
I must embark a pointer (different) in each server_rec to allow to
differentiate the server env.
I thus use the callback create_server_config which return a pointer which
will be written in a vector server_rec->module_config.
The problem arises at the ap_fixup_virtual_hosts() (main.c +540)
This function executes for each server the function merge_server_configs()
and the bug reside in this function.
At the time to associate the vectors of configuration modulates if a vector
of module is available it will be automatically replaced by that basic.
If not and if a callback merge_server_config is available then this one is
executed.
Blow at the time of the child_init I have the same pointer of configuration
modulates in all server interfaces. Whereas I should have a different for
each servers.
All that to say to you that when you use the callback create_server_config
and that this one return a pointer the callback merge_server_config will
never be executed. It is nothing like bug, but that gives many problems to
me.
server/config.c in merge_server_configs() :
<snip>
for (modp = ap_top_module; modp; modp = modp->next) {
merger_func df = modp->merge_server_config;
int i = modp->module_index;
if (!virt_vector[i])
virt_vector[i] = base_vector[i];
else if (df)
virt_vector[i] = (*df)(p, base_vector[i], virt_vector[i]);
}
</snip>
Should to be
<snip>
for (modp = ap_top_module; modp; modp = modp->next) {
merger_func df = modp->merge_server_config;
int i = modp->module_index;
if (df)
virt_vector[i] = (*df)(p, base_vector[i], virt_vector[i]);
else if (!virt_vector[i])
virt_vector[i] = base_vector[i];
}
</snip>
Thanks
Michael Vergoz