summaryrefslogtreecommitdiffstats
path: root/server/main.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 10:03:17 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 10:03:17 +0000
commit69f568eb1183a2a1f5148e6db34a8d42e0e52ff6 (patch)
treefdeb0b5ff80273f95ce61607fc3613dff0b9a235 /server/main.c
parentAdding upstream version 2.4.57. (diff)
downloadapache2-69f568eb1183a2a1f5148e6db34a8d42e0e52ff6.tar.xz
apache2-69f568eb1183a2a1f5148e6db34a8d42e0e52ff6.zip
Adding upstream version 2.4.59.upstream/2.4.59upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--server/main.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/server/main.c b/server/main.c
index 7da7aa2..fb23f01 100644
--- a/server/main.c
+++ b/server/main.c
@@ -678,8 +678,8 @@ int main(int argc, const char * const argv[])
if (temp_error_log) {
ap_replace_stderr_log(process->pool, temp_error_log);
}
- ap_server_conf = ap_read_config(process, ptemp, confname, &ap_conftree);
- if (!ap_server_conf) {
+ ap_server_conf = NULL; /* set early by ap_read_config() for logging */
+ if (!ap_read_config(process, ptemp, confname, &ap_conftree)) {
if (showcompile) {
/* Well, we tried. Show as much as we can, but exit nonzero to
* indicate that something's not right. The cause should have
@@ -688,6 +688,7 @@ int main(int argc, const char * const argv[])
}
destroy_and_exit_process(process, 1);
}
+ ap_assert(ap_server_conf != NULL);
apr_pool_cleanup_register(pconf, &ap_server_conf, ap_pool_cleanup_set_null,
apr_pool_cleanup_null);
@@ -785,10 +786,11 @@ int main(int argc, const char * const argv[])
apr_pool_create(&ptemp, pconf);
apr_pool_tag(ptemp, "ptemp");
ap_server_root = def_server_root;
- ap_server_conf = ap_read_config(process, ptemp, confname, &ap_conftree);
- if (!ap_server_conf) {
+ ap_server_conf = NULL; /* set early by ap_read_config() for logging */
+ if (!ap_read_config(process, ptemp, confname, &ap_conftree)) {
destroy_and_exit_process(process, 1);
}
+ ap_assert(ap_server_conf != NULL);
apr_pool_cleanup_register(pconf, &ap_server_conf,
ap_pool_cleanup_set_null, apr_pool_cleanup_null);
/* sort hooks here to make sure pre_config hooks are sorted properly */