src/session.c
static void prepare_mini_sess_log_prefix(struct session *s)
{
	struct tm tm;
	char pn[INET6_ADDRSTRLEN];
	int ret;
	char *end;

	ret = addr_to_str(&s->si[0].conn->addr.from, pn, sizeof(pn));
	if (ret <= 0)
		chunk_printf(&trash, "unknown [");
	else if (ret == AF_UNIX)
		chunk_printf(&trash, "%s:%d [", pn, s->listener->luid);
	else
		chunk_printf(&trash, "%s:%d [", pn, get_host_port(&s->si[0].conn->addr.from));

	get_localtime(s->logs.accept_date.tv_sec, &tm);
	end = date2str_log(trash.str + trash.len, &tm, &(s->logs.accept_date), trash.size - trash.len);
	trash.len = end - trash.str;
	if (s->listener->name)
		chunk_appendf(&trash, "] %s/%s", s->fe->id, s->listener->name);
	else
		chunk_appendf(&trash, "] %s/%d", s->fe->id, s->listener->luid);
}
/* prepare the trash with a log prefix for session <s> */
prepare the trash with a log prefix for session 
prepare the trash with a log prefix for session
static void prepare_mini_sess_log_prefix(struct session *s)
{
	struct tm tm;
	char pn[INET6_ADDRSTRLEN];
	int ret;
	char *end;
	ret = addr_to_str(&s->si[0].conn->addr.from, pn, sizeof(pn));
	if (ret <= 0)
		chunk_printf(&trash, "unknown [");
	else if (ret == AF_UNIX)
		chunk_printf(&trash, "%s:%d [", pn, s->listener->luid);
	else
		chunk_printf(&trash, "%s:%d [", pn, get_host_port(&s->si[0].conn->addr.from));
	get_localtime(s->logs.accept_date.tv_sec, &tm);
	end = date2str_log(trash.str + trash.len, &tm, &(s->logs.accept_date), trash.size - trash.len);
	trash.len = end - trash.str;
	if (s->listener->name)
		chunk_appendf(&trash, "] %s/%s", s->fe->id, s->listener->name);
	else
		chunk_appendf(&trash, "] %s/%d", s->fe->id, s->listener->luid);
}
static void prepare_mini_sess_log_prefix ( struct session * s ) { struct tm tm ; char pn [ INET6_ADDRSTRLEN ] ; int ret ; char * end ; ret = addr_to_str ( & s -> si [ 0 ] . conn -> addr . from , pn , sizeof ( pn ) ) ; if ( ret <= 0 ) chunk_printf ( & trash , " " ) ; else if ( ret == AF_UNIX ) chunk_printf ( & trash , " " , pn , s -> listener -> luid ) ; else chunk_printf ( & trash , " " , pn , get_host_port ( & s -> si [ 0 ] . conn -> addr . from ) ) ; get_localtime ( s -> logs . accept_date . tv_sec , & tm ) ; end = date2str_log ( trash . str + trash . len , & tm , & ( s -> logs . accept_date ) , trash . size - trash . len ) ; trash . len = end - trash . str ; if ( s -> listener -> name ) chunk_appendf ( & trash , " " , s -> fe -> id , s -> listener -> name ) ; else chunk_appendf ( & trash , " " , s -> fe -> id , s -> listener -> luid ) ; }
prepare the trash with a log prefix for session <s>
prepare the trash with a log prefix for session <s >