apr_hook_debug_show("post_config", aszPre, aszSucc);
}
-AP_DECLARE(apr_array_header_t *) ap_hook_get_post_config(void) {
+AP_DECLARE(apr_array_header_t *) ap_hook_get_post_config(void)
+{
return _hooks.link_post_config;
}
ap_LINK_post_config_t *pHook;
int n;
- if(!_hooks.link_post_config)
+ if (!_hooks.link_post_config)
return;
pHook = (ap_LINK_post_config_t *)_hooks.link_post_config->elts;
char *w, *w2, *w3;
const char *errmsg = NULL;
- /** Have we been provided a list of acceptable directives? */
+ /* Have we been provided a list of acceptable directives? */
if (parms->override_list != NULL) {
if (apr_table_get(parms->override_list, cmd->name) != NULL) {
override_list_ok = 1;
return errmsg;
case FLAG:
- w = ap_getword_conf(parms->pool, &args);
+ /*
+ * This is safe to use temp_pool here, because the 'flag' itself is not
+ * forwarded as-is
+ */
+ w = ap_getword_conf(parms->temp_pool, &args);
if (*w == '\0' || (strcasecmp(w, "on") && strcasecmp(w, "off")))
return apr_pstrcat(parms->pool, cmd->name, " must be On or Off",
*/
last_ptr = &(current->last);
- if(last_ptr && *last_ptr) {
+ if (last_ptr && *last_ptr) {
current = *last_ptr;
}
current = current->next;
}
- if(last_ptr) {
+ if (last_ptr) {
/* update cached pointer to last node */
*last_ptr = current;
}
ap_varbuf_init(cmd->temp_pool, &vb, VARBUF_INIT_LEN);
- while((rc = ap_varbuf_cfg_getline(&vb, cmd->config_file, max_len))
- == APR_SUCCESS) {
-#if RESOLVE_ENV_PER_TOKEN
+ while ((rc = ap_varbuf_cfg_getline(&vb, cmd->config_file, max_len))
+ == APR_SUCCESS) {
args = vb.buf;
-#else
- args = ap_resolve_env(cmd->temp_pool, vb.buf);
-#endif
cmd_name = ap_getword_conf(cmd->temp_pool, &args);
if (cmd_name[0] == '<') {
/* find the first part of the filename */
rest = ap_strchr_c(fname, '/');
if (rest) {
- fname = apr_pstrndup(ptemp, fname, rest - fname);
+ fname = apr_pstrmemdup(ptemp, fname, rest - fname);
rest++;
}