mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-11-29 14:50:59 +01:00
MINOR: actions: remove the mark indicating the last entry in enum
This mark permit to detect if the action tag is over the allowed range. - Normally, this case doesn't appear - If it appears, it is processed by ded fault case of the switch
This commit is contained in:
parent
5563e4b469
commit
22e49011b1
@ -252,7 +252,6 @@ enum {
|
|||||||
HTTP_REQ_ACT_TRK_SC0,
|
HTTP_REQ_ACT_TRK_SC0,
|
||||||
/* SC1, SC2, ... SCn */
|
/* SC1, SC2, ... SCn */
|
||||||
HTTP_REQ_ACT_TRK_SCMAX = HTTP_REQ_ACT_TRK_SC0 + MAX_SESS_STKCTR - 1,
|
HTTP_REQ_ACT_TRK_SCMAX = HTTP_REQ_ACT_TRK_SC0 + MAX_SESS_STKCTR - 1,
|
||||||
HTTP_REQ_ACT_MAX /* must always be last */
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/* actions for "http-response" */
|
/* actions for "http-response" */
|
||||||
@ -276,7 +275,6 @@ enum {
|
|||||||
HTTP_RES_ACT_REDIR,
|
HTTP_RES_ACT_REDIR,
|
||||||
HTTP_RES_ACT_CUSTOM_STOP, /* used for module keywords */
|
HTTP_RES_ACT_CUSTOM_STOP, /* used for module keywords */
|
||||||
HTTP_RES_ACT_CUSTOM_CONT, /* used for module keywords */
|
HTTP_RES_ACT_CUSTOM_CONT, /* used for module keywords */
|
||||||
HTTP_RES_ACT_MAX /* must always be last */
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/* final results for http-request rules */
|
/* final results for http-request rules */
|
||||||
|
|||||||
@ -3432,8 +3432,6 @@ http_req_get_intercept_rule(struct proxy *px, struct list *rules, struct stream
|
|||||||
s->current_rule_list = rules;
|
s->current_rule_list = rules;
|
||||||
|
|
||||||
list_for_each_entry(rule, rules, list) {
|
list_for_each_entry(rule, rules, list) {
|
||||||
if (rule->action >= HTTP_REQ_ACT_MAX)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
/* check optional condition */
|
/* check optional condition */
|
||||||
if (rule->cond) {
|
if (rule->cond) {
|
||||||
@ -3694,6 +3692,10 @@ resume_execution:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
/* other flags exists, but normaly, they never be matched. */
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3735,8 +3737,6 @@ http_res_get_intercept_rule(struct proxy *px, struct list *rules, struct stream
|
|||||||
s->current_rule_list = rules;
|
s->current_rule_list = rules;
|
||||||
|
|
||||||
list_for_each_entry(rule, rules, list) {
|
list_for_each_entry(rule, rules, list) {
|
||||||
if (rule->action >= HTTP_RES_ACT_MAX)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
/* check optional condition */
|
/* check optional condition */
|
||||||
if (rule->cond) {
|
if (rule->cond) {
|
||||||
@ -3918,6 +3918,10 @@ resume_execution:
|
|||||||
case HTTP_RES_ACT_CUSTOM_STOP:
|
case HTTP_RES_ACT_CUSTOM_STOP:
|
||||||
rule->action_ptr(rule, px, s->sess, s);
|
rule->action_ptr(rule, px, s->sess, s);
|
||||||
return HTTP_RULE_RES_STOP;
|
return HTTP_RULE_RES_STOP;
|
||||||
|
|
||||||
|
/* other flags exists, but normaly, they never be matched. */
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user