You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by David Reid <dr...@jetnet.co.uk> on 2000/06/12 00:27:18 UTC
Re: cvs commit: apache-2.0/src/main http_config.c http_main.c
I'll test in the morning. :)
david
----- Original Message -----
From: <tr...@locus.apache.org>
To: <ap...@apache.org>
Sent: Sunday, June 11, 2000 11:06 PM
Subject: cvs commit: apache-2.0/src/main http_config.c http_main.c
> trawick 00/06/11 15:06:57
>
> Modified: src/include http_config.h
> src/main http_config.c http_main.c
> Log:
> Fix a couple of problems with the pre/post config processing changes:
>
> 1) symptom: on system with bad/no DNS setup, ServerName isn't
> processed so init fails
>
> cause:
>
> ap_fini_vhost_config() called before ap_process_config_tree(), so
> ServerName was never stored in the config structure
>
> 2) symptom: on system with virtual hosts configured, SIGSEGV in
> open_multi_logs()
>
> cause:
>
> the module configs for the virtual hosts haven't been merged in
> yet, and open_multi_logs() gets NULL for the mod_log_config
> configuration
>
> This stuff needs to be cleaned up further, exploring the use of a
> post-config hook for fixup_virtual_hosts(), ap_fini_vhost_config(),
> and ap_sort_hooks(), getting a lot of logic out of main(), and
> processing the config tree only once.
>
> Revision Changes Path
> 1.31 +1 -0 apache-2.0/src/include/http_config.h
>
> Index: http_config.h
> ===================================================================
> RCS file: /home/cvs/apache-2.0/src/include/http_config.h,v
> retrieving revision 1.30
> retrieving revision 1.31
> diff -u -r1.30 -r1.31
> --- http_config.h 2000/06/06 01:20:01 1.30
> +++ http_config.h 2000/06/11 22:06:56 1.31
> @@ -385,6 +385,7 @@
> API_EXPORT(void) ap_post_config_hook(ap_pool_t *pconf, ap_pool_t *plog,
ap_pool_t *ptemp, server_rec *s);
> API_EXPORT(void) ap_run_rewrite_args(process_rec *process);
> API_EXPORT(void) ap_register_hooks(module *m);
> +API_EXPORT(void) ap_fixup_virtual_hosts(ap_pool_t *p, server_rec
*main_server);
>
> /* For http_request.c... */
>
>
>
>
> 1.61 +1 -5 apache-2.0/src/main/http_config.c
>
> Index: http_config.c
> ===================================================================
> RCS file: /home/cvs/apache-2.0/src/main/http_config.c,v
> retrieving revision 1.60
> retrieving revision 1.61
> diff -u -r1.60 -r1.61
> --- http_config.c 2000/06/06 01:20:02 1.60
> +++ http_config.c 2000/06/11 22:06:57 1.61
> @@ -1479,7 +1479,7 @@
> }
>
>
> -static void fixup_virtual_hosts(ap_pool_t *p, server_rec *main_server)
> +API_EXPORT(void) ap_fixup_virtual_hosts(ap_pool_t *p, server_rec
*main_server)
> {
> server_rec *virt;
>
> @@ -1575,10 +1575,6 @@
>
> process_command_config(s, ap_server_post_read_config, conftree,
> p, ptemp);
> -
> - fixup_virtual_hosts(p, s);
> - ap_fini_vhost_config(p, s);
> - ap_sort_hooks();
>
> return s;
> }
>
>
>
> 1.59 +7 -0 apache-2.0/src/main/http_main.c
>
> Index: http_main.c
> ===================================================================
> RCS file: /home/cvs/apache-2.0/src/main/http_main.c,v
> retrieving revision 1.58
> retrieving revision 1.59
> diff -u -r1.58 -r1.59
> --- http_main.c 2000/06/10 16:14:56 1.58
> +++ http_main.c 2000/06/11 22:06:57 1.59
> @@ -62,6 +62,7 @@
> #include "http_main.h"
> #include "http_log.h"
> #include "http_config.h"
> +#include "http_vhost.h"
> #include "util_uri.h"
> #include "util_ebcdic.h"
> #include "apr_getopt.h"
> @@ -371,6 +372,9 @@
> server_conf = ap_read_config(process, ptemp, confname, &conftree);
> ap_run_pre_config(pconf, plog, ptemp);
> ap_process_config_tree(server_conf, conftree, process->pconf,
ptemp);
> + ap_fixup_virtual_hosts(pconf, server_conf);
> + ap_fini_vhost_config(pconf, server_conf);
> + ap_sort_hooks();
> if (configtestonly) {
> ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL,
"Syntax OK\n");
> destroy_and_exit_process(process, 0);
> @@ -396,6 +400,9 @@
> server_conf = ap_read_config(process, ptemp, confname,
&conftree);
> ap_run_pre_config(pconf, plog, ptemp);
> ap_process_config_tree(server_conf, conftree, process->pconf,
ptemp);
> + ap_fixup_virtual_hosts(pconf, server_conf);
> + ap_fini_vhost_config(pconf, server_conf);
> + ap_sort_hooks();
> ap_clear_pool(plog);
> ap_run_open_logs(pconf, plog, ptemp, server_conf);
> ap_post_config_hook(pconf, plog, ptemp, server_conf);
>
>
>
>