1
0
mirror of https://github.com/apache/httpd.git synced 2025-11-05 05:30:39 +03:00

- Add another check during ErrorLogFormat parsing

- Simplify code (including Ruediger's suggestions)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@993120 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Stefan Fritsch
2010-09-06 18:53:38 +00:00
parent 800bdf5581
commit 3ad914e110
3 changed files with 23 additions and 19 deletions

View File

@@ -3272,6 +3272,10 @@ static apr_array_header_t *parse_errorlog_string(apr_pool_t *p,
}
seen_msg_fmt = 1;
}
if (want_msg_fmt && item->flags & AP_ERRORLOG_FLAG_REQUIRED) {
*err = "The '+' flag cannot be used in the main error log format";
return NULL;
}
}
if (want_msg_fmt && !seen_msg_fmt) {
@@ -3299,7 +3303,7 @@ static const char *set_errorlog_format(cmd_parms *cmd, void *dummy,
sizeof(apr_array_header_t *));
}
if (arg2 && *arg2) {
if (*arg2) {
apr_array_header_t **e;
e = (apr_array_header_t **) apr_array_push(conf->error_log_conn);
*e = parse_errorlog_string(cmd->pool, arg2, &err_string, 0);
@@ -3311,7 +3315,7 @@ static const char *set_errorlog_format(cmd_parms *cmd, void *dummy,
sizeof(apr_array_header_t *));
}
if (arg2 && *arg2) {
if (*arg2) {
apr_array_header_t **e;
e = (apr_array_header_t **) apr_array_push(conf->error_log_req);
*e = parse_errorlog_string(cmd->pool, arg2, &err_string, 0);