]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG: counters: third counter was not stored if others unset
authorWilly Tarreau <w@1wt.eu>
Mon, 1 Jul 2013 16:07:03 +0000 (18:07 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 1 Jul 2013 16:08:41 +0000 (18:08 +0200)
Commit e25c917a introduced a third tracking counter bug forgot
to check it when storing values at the end of the session. The
impact is that  if neither the first nor the second one are
changed, none of them are saved.

src/session.c

index ec26522f69e547ad036f533e6a8a18f77054ec89..3f117e6df03e3528847f293865aef9ec1134a1a2 100644 (file)
@@ -312,8 +312,7 @@ static void kill_mini_session(struct session *s)
        conn_full_close(s->si[0].conn);
 
        s->fe->feconn--;
-       if (s->stkctr[0].entry || s->stkctr[1].entry)
-               session_store_counters(s);
+       session_store_counters(s);
 
        if (!(s->listener->options & LI_O_UNLIMITED))
                actconn--;
@@ -649,8 +648,7 @@ static void session_free(struct session *s)
                pool_free2(fe->req_cap_pool, txn->req.cap);
        }
 
-       if (s->stkctr[0].entry || s->stkctr[1].entry)
-               session_store_counters(s);
+       session_store_counters(s);
 
        list_for_each_entry_safe(bref, back, &s->back_refs, users) {
                /* we have to unlink all watchers. We must not relink them if