Commit 923e94ba authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Clean all but t_open timestamps to NAN at end of transaction.


git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@1684 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 548d1b71
......@@ -58,6 +58,7 @@ DOT start -> recv [style=bold,color=green,weight=4]
#include <stdio.h>
#include <errno.h>
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
......@@ -196,8 +197,11 @@ cnt_done(struct sess *sp)
sp->xid, sp->t_req, sp->t_end, dh, dp, da);
sp->xid = 0;
sp->t_open = sp->t_end;
SES_Charge(sp);
sp->t_open = sp->t_end;
sp->t_req = NAN;
sp->t_resp = NAN;
sp->t_end = NAN;
WSL_Flush(sp->wrk);
if (sp->fd >= 0 && sp->doclose != NULL)
vca_close_session(sp, sp->doclose);
......
......@@ -229,6 +229,7 @@ SES_Charge(struct sess *sp)
ses_sum_acct(&sp->acct, a);
if (sp->srcaddr != NULL) {
/* XXX: only report once per second ? */
CHECK_OBJ(sp->srcaddr, SRCADDR_MAGIC);
LOCK(&sp->srcaddr->sah->mtx);
ses_sum_acct(&sp->srcaddr->acct, a);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment