src/dumpstats.c
static struct proxy *alloc_stats_fe(const char *name, const char *file, int line)
{
	struct proxy *fe;

	fe = (struct proxy *)calloc(1, sizeof(struct proxy));
	if (!fe)
		return NULL;

	init_new_proxy(fe);
	fe->next = proxy;
	proxy = fe;
	fe->last_change = now.tv_sec;
	fe->id = strdup("GLOBAL");
	fe->cap = PR_CAP_FE;
	fe->maxconn = 10;                 /* default to 10 concurrent connections */
	fe->timeout.client = MS_TO_TICKS(10000); /* default timeout of 10 seconds */
	fe->conf.file = strdup(file);
	fe->conf.line = line;
	fe->accept = stats_accept;

	/* the stats frontend is the only one able to assign ID #0 */
	fe->conf.id.key = fe->uuid = 0;
	eb32_insert(&used_proxy_id, &fe->conf.id);
	return fe;
}
/* allocate a new stats frontend named <name>, and return it
 * (or NULL in case of lack of memory).
 */
allocate a new stats frontend named , and return it
(or NULL in case of lack of memory).
allocate a new stats frontend named and return it ( or NULL in case of lack of memory ) .
static struct proxy *alloc_stats_fe(const char *name, const char *file, int line)
{
	struct proxy *fe;
	fe = (struct proxy *)calloc(1, sizeof(struct proxy));
	if (!fe)
		return NULL;
	init_new_proxy(fe);
	fe->next = proxy;
	proxy = fe;
	fe->last_change = now.tv_sec;
	fe->id = strdup("GLOBAL");
	fe->cap = PR_CAP_FE;
	fe->maxconn = 10;                 
	fe->timeout.client = MS_TO_TICKS(10000); 
	fe->conf.file = strdup(file);
	fe->conf.line = line;
	fe->accept = stats_accept;
	fe->conf.id.key = fe->uuid = 0;
	eb32_insert(&used_proxy_id, &fe->conf.id);
	return fe;
}
static struct proxy * alloc_stats_fe ( const char * name , const char * file , int line ) { struct proxy * fe ; fe = ( struct proxy * ) calloc ( 1 , sizeof ( struct proxy ) ) ; if ( ! fe ) return NULL ; init_new_proxy ( fe ) ; fe -> next = proxy ; proxy = fe ; fe -> last_change = now . tv_sec ; fe -> id = strdup ( " " ) ; fe -> cap = PR_CAP_FE ; fe -> maxconn = 10 ; fe -> timeout . client = MS_TO_TICKS ( 10000 ) ; fe -> conf . file = strdup ( file ) ; fe -> conf . line = line ; fe -> accept = stats_accept ; fe -> conf . id . key = fe -> uuid = 0 ; eb32_insert ( & used_proxy_id , & fe -> conf . id ) ; return fe ; }
allocate a new stats frontend named <name>, and return it
 (or NULL in case of lack of memory).
allocate a new stats frontend named <name > and return it ( or NULL in case of lack of memory ) .
/* default to 10 concurrent connections */ /* default timeout of 10 seconds */ /* the stats frontend is the only one able to assign ID #0 */