]> git.kaiwu.me - haproxy.git/commitdiff
CLEANUP: server: remove wrong comments about server-template ID
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Fri, 31 Jul 2026 09:26:55 +0000 (11:26 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Mon, 3 Aug 2026 09:11:19 +0000 (11:11 +0200)
This misleading comment suggests that server <id> field is set to the
prefix for a server-template. In fact, this field remains NULL and
prefix is set to <tmpl_info.prefix>.

src/server.c

index 494fa5e6010195840add2255872787ca5f6ef612..0f586c24ddb85f1afdde1be29017c77fa8bc7db8 100644 (file)
@@ -3740,10 +3740,6 @@ static int _srv_parse_init(struct server **srv, char **args, int *cur_arg,
                if (parse_flags & SRV_PARSE_DYNAMIC)
                        newsrv->flags |= SRV_F_DYNAMIC;
 
-               /* Note: for a server template, its id is its prefix.
-                * This is a temporary id which will be used for server allocations to come
-                * after parsing.
-                */
                if (!(parse_flags & SRV_PARSE_TEMPLATE))
                        newsrv->id = strdup(args[1]);
                else