Basic implementation of skipAfter (still need to implement placeholders so it works with removed rules). See #258.

This commit is contained in:
brectanus
2007-10-17 19:59:28 +00:00
parent 974298a76c
commit 9d49adf028
4 changed files with 71 additions and 0 deletions

View File

@@ -420,6 +420,21 @@ static apr_status_t msre_action_skip_init(msre_engine *engine, msre_actionset *a
return 1;
}
/* skipAfter */
static char *msre_action_skipAfter_validate(msre_engine *engine, msre_action *action) {
/* ENH Add validation. */
return NULL;
}
static apr_status_t msre_action_skipAfter_init(msre_engine *engine, msre_actionset *actionset,
msre_action *action)
{
// TODO: Need to keep track of skipAfter IDs so we can insert placeholders after we get to the real rule with that ID.
actionset->skip_after = action->param;
return 1;
}
/* allow */
static apr_status_t msre_action_allow_init(msre_engine *engine, msre_actionset *actionset,
@@ -1660,6 +1675,18 @@ void msre_engine_register_default_actions(msre_engine *engine) {
NULL
);
/* skipAfter */
msre_engine_action_register(engine,
"skipAfter",
ACTION_DISRUPTIVE,
1, 1,
NO_PLUS_MINUS,
ACTION_CARDINALITY_ONE,
msre_action_skipAfter_validate,
msre_action_skipAfter_init,
NULL
);
/* allow */
msre_engine_action_register(engine,
"allow",