You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by yl...@apache.org on 2023/03/14 15:43:27 UTC
svn commit: r1908390 - /httpd/httpd/trunk/server/log.c
Author: ylavic
Date: Tue Mar 14 15:43:27 2023
New Revision: 1908390
URL: http://svn.apache.org/viewvc?rev=1908390&view=rev
Log:
log: Follow up to r1908388: ap_server_conf might be NULL.
Modified:
httpd/httpd/trunk/server/log.c
Modified: httpd/httpd/trunk/server/log.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/log.c?rev=1908390&r1=1908389&r2=1908390&view=diff
==============================================================================
--- httpd/httpd/trunk/server/log.c (original)
+++ httpd/httpd/trunk/server/log.c Tue Mar 14 15:43:27 2023
@@ -1100,7 +1100,9 @@ static void log_error_core(const char *f
}
/* Use the main ErrorLogFormat if any */
- sconf = ap_get_core_module_config(ap_server_conf->module_config);
+ if (ap_server_conf) {
+ sconf = ap_get_core_module_config(ap_server_conf->module_config);
+ }
}
else {
int configured_level = r ? ap_get_request_module_loglevel(r, module_index) :
@@ -1148,7 +1150,7 @@ static void log_error_core(const char *f
}
}
}
- else {
+ else if (ap_server_conf) {
/* Use the main ErrorLogFormat if any */
sconf = ap_get_core_module_config(ap_server_conf->module_config);
}
@@ -1222,7 +1224,7 @@ static void log_error_core(const char *f
info.file = file;
info.line = line;
info.status = status;
- log_format = sconf->error_log_format;
+ log_format = sconf ? sconf->error_log_format : NULL;
done = 1;
}