src/dumpstats.c
static int bind_parse_level(char **args, int cur_arg, struct proxy *px, struct bind_conf *conf, char **err)
{
	if (!*args[cur_arg + 1]) {
		memprintf(err, "'%s' : missing level", args[cur_arg]);
		return ERR_ALERT | ERR_FATAL;
	}

	if (!strcmp(args[cur_arg+1], "user"))
		conf->level = ACCESS_LVL_USER;
	else if (!strcmp(args[cur_arg+1], "operator"))
		conf->level = ACCESS_LVL_OPER;
	else if (!strcmp(args[cur_arg+1], "admin"))
		conf->level = ACCESS_LVL_ADMIN;
	else {
		memprintf(err, "'%s' only supports 'user', 'operator', and 'admin' (got '%s')",
			  args[cur_arg], args[cur_arg+1]);
		return ERR_ALERT | ERR_FATAL;
	}

	return 0;
}
/* parse the "level" argument on the bind lines */
parse the "level" argument on the bind lines
parse the " level " argument on the bind lines
static int bind_parse_level(char **args, int cur_arg, struct proxy *px, struct bind_conf *conf, char **err)
{
	if (!*args[cur_arg + 1]) {
		memprintf(err, "'%s' : missing level", args[cur_arg]);
		return ERR_ALERT | ERR_FATAL;
	}
	if (!strcmp(args[cur_arg+1], "user"))
		conf->level = ACCESS_LVL_USER;
	else if (!strcmp(args[cur_arg+1], "operator"))
		conf->level = ACCESS_LVL_OPER;
	else if (!strcmp(args[cur_arg+1], "admin"))
		conf->level = ACCESS_LVL_ADMIN;
	else {
		memprintf(err, "'%s' only supports 'user', 'operator', and 'admin' (got '%s')",
			  args[cur_arg], args[cur_arg+1]);
		return ERR_ALERT | ERR_FATAL;
	}
	return 0;
}
static int bind_parse_level ( char * * args , int cur_arg , struct proxy * px , struct bind_conf * conf , char * * err ) { if ( ! * args [ cur_arg + 1 ] ) { memprintf ( err , " " , args [ cur_arg ] ) ; return ERR_ALERT | ERR_FATAL ; } if ( ! strcmp ( args [ cur_arg + 1 ] , " " ) ) conf -> level = ACCESS_LVL_USER ; else if ( ! strcmp ( args [ cur_arg + 1 ] , " " ) ) conf -> level = ACCESS_LVL_OPER ; else if ( ! strcmp ( args [ cur_arg + 1 ] , " " ) ) conf -> level = ACCESS_LVL_ADMIN ; else { memprintf ( err , " " , args [ cur_arg ] , args [ cur_arg + 1 ] ) ; return ERR_ALERT | ERR_FATAL ; } return 0 ; }
parse the "level" argument on the bind lines
parse the " level " argument on the bind lines