]> git.ipfire.org Git - thirdparty/haproxy.git/commit
[MINOR] proxy: provide function to retrieve backend/server pointers
authorWilly Tarreau <w@1wt.eu>
Sat, 10 Oct 2009 16:35:51 +0000 (18:35 +0200)
committerWilly Tarreau <w@1wt.eu>
Sat, 10 Oct 2009 16:36:25 +0000 (18:36 +0200)
commitf395017227aae1dd1d9c032fd22eb3240c7cdfbc
tree20ece7d63776dee48976961f50530fa38c8b5d12
parent9bcc91e80e4acfd7cf57ed4532f6d94f4f0d1aa3
[MINOR] proxy: provide function to retrieve backend/server pointers

int get_backend_server(const char *bk_name, const char *sv_name,
                       struct proxy **bk, struct server **sv);

This function scans the list of backends and servers to retrieve the first
backend and the first server with the given names, and sets them in both
parameters. It returns zero if either is not found, or non-zero and sets
the ones it did not found to NULL. If a NULL pointer is passed for the
backend, only the pointer to the server will be updated.
include/proto/proxy.h
src/proxy.c