]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: session: remove term_trace which is not used anymore
authorWilly Tarreau <w@1wt.eu>
Sat, 13 Oct 2012 09:09:14 +0000 (11:09 +0200)
committerWilly Tarreau <w@1wt.eu>
Sat, 13 Oct 2012 09:10:30 +0000 (11:10 +0200)
This field was used to trace precisely where a session was terminated
but it did not survive code rearchitecture and was not used at all
anymore. Let's get rid of it.

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

index 049fc931c61822b24f9002decaf01e7c139873e0..a17aa94b2fc759e0766da027571496975b70181e 100644 (file)
@@ -160,12 +160,6 @@ static inline void session_track_stkctr2(struct session *s, struct stktable *t,
        session_start_counters(t, ts);
 }
 
-static void inline trace_term(struct session *s, unsigned int code)
-{
-       s->term_trace <<= TT_BIT_SHIFT;
-       s->term_trace |= code;
-}
-
 /* Increase the number of cumulated HTTP requests in the tracked counters */
 static void inline session_inc_http_req_ctr(struct session *s)
 {
index 0450163c0fb8b4a6b0b55ba1b85ffe196a93f288..54f0551c800ca16d5fb01e74efc996ac88672245 100644 (file)
 #define SN_BE_TRACK_SC1 0x00100000     /* backend tracks stick-counter 1 */
 #define SN_BE_TRACK_SC2 0x00200000     /* backend tracks stick-counter 2 */
 
-/* Termination sequence tracing.
- *
- * These values have to be set into the field term_trace of a session when
- * closing a session (half or full). They are only meant for post-mortem
- * analysis. The value must be assigned this way :
- *    trace_term(s, TT_XXX);
- *
- * One TT_XXX value is assigned to each location in the code which may be
- * involved in a connection closing. Since a full session close generally
- * involves 4 steps, we will be able to read these steps afterwards by simply
- * checking the code. Value TT_NONE is zero and must never be set, as it means
- * the connection was not closed. Value TT_ANON must be used when no value was
- * assigned to a specific code part. Never ever reuse an already assigned code
- * as it will defeat the purpose of this trace. It is wise to use a per-file
- * anonymous value though.
- */
-#define TT_BIT_SHIFT 8
-enum {
-       TT_NONE     = 0,
-       TT_ANON     = 1,
-       TT_CLIENT   = 0x10,
-       TT_CLIENT_1,
-       TT_CLIENT_2,
-       TT_HTTP_CLI = 0x20,
-       TT_HTTP_CLI_1,
-       TT_HTTP_CLI_2,
-       TT_HTTP_CLI_3,
-       TT_HTTP_CLI_4,
-       TT_HTTP_CLI_5,
-       TT_HTTP_CLI_6,
-       TT_HTTP_CLI_7,
-       TT_HTTP_CLI_8,
-       TT_HTTP_CLI_9,
-       TT_HTTP_CLI_10,
-       TT_HTTP_SRV = 0x30,
-       TT_HTTP_SRV_1,
-       TT_HTTP_SRV_2,
-       TT_HTTP_SRV_3,
-       TT_HTTP_SRV_4,
-       TT_HTTP_SRV_5,
-       TT_HTTP_SRV_6,
-       TT_HTTP_SRV_7,
-       TT_HTTP_SRV_8,
-       TT_HTTP_SRV_9,
-       TT_HTTP_SRV_10,
-       TT_HTTP_SRV_11,
-       TT_HTTP_SRV_12,
-       TT_HTTP_SRV_13,
-       TT_HTTP_SRV_14,
-       TT_HTTP_CNT = 0x40,
-       TT_HTTP_CNT_1,
-       TT_HTTP_URI = 0x50,
-       TT_HTTP_URI_1,
-};
-
 
 /* WARNING: if new fields are added, they must be initialized in event_accept()
  * and freed in session_free() !
@@ -168,7 +113,6 @@ struct session {
        struct proxy *fe;                       /* the proxy this session depends on for the client side */
        struct proxy *be;                       /* the proxy this session depends on for the server side */
        int flags;                              /* some flags describing the session */
-       unsigned term_trace;                    /* term trace: 4*8 bits indicating which part of the code closed */
        struct channel *req;                    /* request buffer */
        struct channel *rep;                    /* response buffer */
        struct stream_interface si[2];          /* client and server stream interfaces */
index f3ca6f7e049669faa6804e096964a6e8e824d57a..2cf0e524f16b15cef0c5d94492ba912d72181e1b 100644 (file)
@@ -1119,7 +1119,6 @@ static struct session *peer_session_create(struct peer *peer, struct peer_sessio
        LIST_INIT(&s->back_refs);
 
        s->flags = SN_ASSIGNED|SN_ADDR_SET;
-       s->term_trace = 0;
 
        /* if this session comes from a known monitoring system, we want to ignore
         * it as soon as possible, which means closing it immediately for TCP.
index ce99e782489d915a5fa270605c4c2914503e758a..77a214de875cf7279683331d8c69e3fbc51abfdf 100644 (file)
@@ -336,7 +336,6 @@ int session_complete(struct session *s)
        s->flags |= SN_INITIALIZED;
 
        s->unique_id = NULL;
-       s->term_trace = 0;
 
        t->process = l->handler;
        t->context = s;