mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2026-05-04 20:46:11 +02:00
MINOR: proxy: also store the name for a defaults section
There's an optional name, but till now it was not even saved into the structure, let's keep it.
This commit is contained in:
parent
ab3410c65d
commit
c02ab03142
@ -261,6 +261,7 @@ int cfg_parse_listen(const char *file, int linenum, char **args, int kwm)
|
||||
init_new_proxy(curr_defproxy);
|
||||
proxy_preset_defaults(curr_defproxy);
|
||||
curproxy = curr_defproxy;
|
||||
curproxy->id = strdup(args[1]); // may be empty
|
||||
curproxy->conf.args.file = curproxy->conf.file = strdup(file);
|
||||
curproxy->conf.args.line = curproxy->conf.line = linenum;
|
||||
defproxy.cap = PR_CAP_DEF | PR_CAP_LISTEN; /* all caps for now */
|
||||
|
||||
@ -1111,6 +1111,7 @@ void proxy_preset_defaults(struct proxy *defproxy)
|
||||
*/
|
||||
void proxy_free_defaults(struct proxy *defproxy)
|
||||
{
|
||||
free(defproxy->id); defproxy->id = NULL;
|
||||
free(defproxy->conf.file); defproxy->conf.file = NULL;
|
||||
free(defproxy->check_command); defproxy->check_command = NULL;
|
||||
free(defproxy->check_path); defproxy->check_path = NULL;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user