mirror of
https://github.com/apache/httpd.git
synced 2025-08-08 15:02:10 +03:00
Check that we have names for both templates and
conditions git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1722351 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -182,7 +182,7 @@ static const char *set_hc_condition(cmd_parms *cmd, void *dummy, const char *arg
|
|||||||
|
|
||||||
name = ap_getword_conf(cmd->temp_pool, &arg);
|
name = ap_getword_conf(cmd->temp_pool, &arg);
|
||||||
if (!*name) {
|
if (!*name) {
|
||||||
return apr_pstrcat(cmd->temp_pool, "Missing name for ",
|
return apr_pstrcat(cmd->temp_pool, "Missing condition name for ",
|
||||||
cmd->cmd->name, NULL);
|
cmd->cmd->name, NULL);
|
||||||
}
|
}
|
||||||
/* get expr. Allow fancy new {...} quoting style */
|
/* get expr. Allow fancy new {...} quoting style */
|
||||||
@@ -222,9 +222,15 @@ static const char *set_hc_template(cmd_parms *cmd, void *dummy, const char *arg)
|
|||||||
ctx = (sctx_t *) ap_get_module_config(cmd->server->module_config,
|
ctx = (sctx_t *) ap_get_module_config(cmd->server->module_config,
|
||||||
&proxy_hcheck_module);
|
&proxy_hcheck_module);
|
||||||
|
|
||||||
|
name = ap_getword_conf(cmd->temp_pool, &arg);
|
||||||
|
if (!*name) {
|
||||||
|
return apr_pstrcat(cmd->temp_pool, "Missing template name for ",
|
||||||
|
cmd->cmd->name, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
template = (hc_template_t *)apr_array_push(ctx->templates);
|
template = (hc_template_t *)apr_array_push(ctx->templates);
|
||||||
|
|
||||||
template->name = apr_pstrdup(ctx->p, ap_getword_conf(cmd->temp_pool, &arg));
|
template->name = apr_pstrdup(ctx->p, name);
|
||||||
template->method = template->passes = template->fails = 1;
|
template->method = template->passes = template->fails = 1;
|
||||||
template->interval = apr_time_from_sec(HCHECK_WATHCHDOG_SEC);
|
template->interval = apr_time_from_sec(HCHECK_WATHCHDOG_SEC);
|
||||||
template->hurl = NULL;
|
template->hurl = NULL;
|
||||||
|
Reference in New Issue
Block a user