} unix_bind;
struct proxy *cli_fe; /* the frontend holding the stats settings */
int numa_cpu_mapping;
+ int cfg_curr_line; /* line number currently being parsed */
+ const char *cfg_curr_file; /* config file currently being parsed or NULL */
+ char *cfg_curr_section; /* config section name currently being parsed or NULL */
+
/* The info above is config stuff, it doesn't change during the process' life */
/* A number of the elements below are updated by all threads in real time and
* suffer high contention, so we need to put them in their own cache lines, if
int non_global_section_parsed = 0;
char *errmsg = NULL;
+ global.cfg_curr_line = 0;
+ global.cfg_curr_file = file;
+
if ((thisline = malloc(sizeof(*thisline) * linesize)) == NULL) {
ha_alert("Out of memory trying to allocate a buffer for a configuration line.\n");
err_code = -1;
}
linenum++;
+ global.cfg_curr_line = linenum;
if (fatal >= 50) {
ha_alert("parsing [%s:%d]: too many fatal errors (%d), stopping now.\n", file, linenum, fatal);
cursection = ics->section_name;
pcs = cs;
cs = ics;
+ free(global.cfg_curr_section);
+ global.cfg_curr_section = strdup(*args[1] ? args[1] : args[0]);
if (global.mode & MODE_DIAG) {
check_section_position(args[0], file, linenum,
err_code |= ERR_ALERT | ERR_FATAL;
}
+ ha_free(&global.cfg_curr_section);
if (cs && cs->post_section_parser)
err_code |= cs->post_section_parser();
cursection = NULL;
free(thisline);
free(outline);
+ global.cfg_curr_line = 0;
+ global.cfg_curr_file = NULL;
+
if (f)
fclose(f);