mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-04-29 14:28:03 +00:00
MINOR: action: Add trk_idx inline function
It returns tracking index corresponding to an action ACT_ACTION_TRK_SC*. It will replace http_trk_idx and tcp_trk_idx.
This commit is contained in:
parent
94bb4c6a48
commit
7421b14c22
@ -68,4 +68,12 @@ static inline void action_build_list(struct list *keywords, struct chunk *chk)
|
|||||||
*p = '\0';
|
*p = '\0';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* for an action ACT_ACTION_TRK_SC*, return a tracking index starting at zero
|
||||||
|
* for SC0. Unknown actions also return zero.
|
||||||
|
*/
|
||||||
|
static inline int trk_idx(int trk_action)
|
||||||
|
{
|
||||||
|
return trk_action - ACT_ACTION_TRK_SC0;
|
||||||
|
}
|
||||||
|
|
||||||
#endif /* _PROTO_ACTION_H */
|
#endif /* _PROTO_ACTION_H */
|
||||||
|
Loading…
Reference in New Issue
Block a user