]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
[MINOR] session: add a pointer to the tracked counters for the source
authorWilly Tarreau <w@1wt.eu>
Mon, 14 Jun 2010 13:32:18 +0000 (15:32 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 14 Jun 2010 13:32:18 +0000 (15:32 +0200)
We'll have to keep counters of various criteria specific to the session's
source. When we get one, keep a pointer to it in the session.

include/types/session.h
src/session.c

index fd86f09d4a05a7cc69dfb6193f4e1392ba6b54bc..fdccc7b1cf8ae7c6f0ae331c494c9fa03533436a 100644 (file)
@@ -184,6 +184,7 @@ struct session {
                int flags;
        } store[8];                             /* tracked stickiness values to store */
        int store_count;
+       struct stksess *tracked_src_counters;   /* tracked counters for this source */
 
        struct {
                int logwait;                    /* log fields waiting to be collected : LW_* */
index 1edc7256180ee96f7a937e73d9def55b45692aa3..262f48629c5532c2da56257af5923959c6888edb 100644 (file)
@@ -174,6 +174,7 @@ int session_accept(struct listener *l, int cfd, struct sockaddr_storage *addr)
 
        /* init store persistence */
        s->store_count = 0;
+       s->tracked_src_counters = NULL;
 
        /* Adjust some socket options */
        if (unlikely(fcntl(cfd, F_SETFL, O_NONBLOCK) == -1)) {