]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: proxy: simplify parsing 'backend/server'
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Mon, 7 Aug 2023 14:24:24 +0000 (16:24 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 24 Aug 2023 12:44:33 +0000 (14:44 +0200)
commitfbe35afaa4e3d5e9c24e9408547c0322c308a066
tree87ed014b09d04c3a7f4014dc66c226c487ff60c7
parent9b47ed1a933f89cc14ad145442e6166d9ae7ffea
MINOR: proxy: simplify parsing 'backend/server'

Several CLI handlers use a server argument specified with the format
'<backend>/<server>'. The parsing of this arguement is done in two
steps, first splitting the string with '/' delimiter and then use
get_backend_server() to retrieve the server instance.

Refactor this code sections with the following changes :
* splitting is reimplented using ist API
* get_backend_server() is removed. Instead use the already existing
  proxy_be_by_name() then server_find_by_name() which contains
  duplicated code with the now removed function.

No functional change occurs with this commit. However, it will be useful
to add new configuration options reusing the same '<backend>/<server>'
for reverse connect.
include/haproxy/proxy.h
src/proxy.c
src/server.c