From: Willy Tarreau Date: Tue, 1 Oct 2013 15:06:10 +0000 (+0200) Subject: BUG/MINOR: peers: set the accept date in outgoing connections X-Git-Tag: v1.5-dev20~253 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ae727bf9b419d58f92b830fd2b938ab8442c7cea;p=thirdparty%2Fhaproxy.git BUG/MINOR: peers: set the accept date in outgoing connections Without this, "show sess" on the CLI reports a wrong age. --- diff --git a/src/peers.c b/src/peers.c index 7247d76244..0516d0cc93 100644 --- a/src/peers.c +++ b/src/peers.c @@ -1181,11 +1181,14 @@ static struct session *peer_session_create(struct peer *peer, struct peer_sessio memset(s->stkctr, 0, sizeof(s->stkctr)); /* FIXME: the logs are horribly complicated now, because they are - * defined in

,

, and later and . + * defined in

,

, and later and . We still initialize + * a few of them to help troubleshooting (eg: show sess shows them). */ s->logs.logwait = 0; s->logs.level = 0; + s->logs.accept_date = date; /* user-visible date for logging */ + s->logs.tv_accept = now; /* corrected date for internal use */ s->do_log = NULL; /* default error reporting function, may be changed by analysers */