mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-10 00:57:02 +02:00
MINOR: actions: add a function returning a service pointer from its name
This function simply calls action_lookup() on the private service_keywords, to look up a service name. This will be used to detect double registration of a same service from Lua. This will be needed by a next patch to fix a bug and will have to be backported.
This commit is contained in:
parent
7a71a6d9d2
commit
87e539906b
@ -416,6 +416,7 @@ static inline void stream_choose_redispatch(struct stream *s)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void service_keywords_register(struct action_kw_list *kw_list);
|
void service_keywords_register(struct action_kw_list *kw_list);
|
||||||
|
struct action_kw *service_find(const char *kw);
|
||||||
void list_services(FILE *out);
|
void list_services(FILE *out);
|
||||||
|
|
||||||
#endif /* _HAPROXY_STREAM_H */
|
#endif /* _HAPROXY_STREAM_H */
|
||||||
|
@ -2770,6 +2770,11 @@ void service_keywords_register(struct action_kw_list *kw_list)
|
|||||||
LIST_ADDQ(&service_keywords, &kw_list->list);
|
LIST_ADDQ(&service_keywords, &kw_list->list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
struct action_kw *service_find(const char *kw)
|
||||||
|
{
|
||||||
|
return action_lookup(&service_keywords, kw);
|
||||||
|
}
|
||||||
|
|
||||||
/* Lists the known services on <out> */
|
/* Lists the known services on <out> */
|
||||||
void list_services(FILE *out)
|
void list_services(FILE *out)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user