]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
[CLEANUP] buffer->cto is not used anymore
authorWilly Tarreau <w@1wt.eu>
Mon, 31 May 2010 09:27:58 +0000 (11:27 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 14 Jun 2010 08:53:14 +0000 (10:53 +0200)
The connection timeout stored in the buffer has not been used since the
stream interface were introduced. Let's get rid of it as it's one of the
things that complicate factoring of the accept() functions.

include/types/buffers.h
src/dumpstats.c
src/frontend.c
src/proto_http.c
src/proxy.c

index 59e6d2960027fd140482c65297b6065b1c768409..6ed8ca6a952cac2aa26b2e6cf92e7a69b47464d9 100644 (file)
@@ -2,7 +2,7 @@
  * include/types/buffers.h
  * Buffer management definitions, macros and inline functions.
  *
- * Copyright (C) 2000-2009 Willy Tarreau - w@1wt.eu
+ * Copyright (C) 2000-2010 Willy Tarreau - w@1wt.eu
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -175,7 +175,6 @@ struct buffer {
        int wex;                        /* expiration date for a write or connect, in ticks */
        int rto;                        /* read timeout, in ticks */
        int wto;                        /* write timeout, in ticks */
-       int cto;                        /* connect timeout, in ticks */
        unsigned int l;                 /* data length */
        char *r, *w, *lr;               /* read ptr, write ptr, last read */
        unsigned int size;              /* buffer size in bytes */
index 1856f2111942dd506054658ff468c4d1143dd906..bbda255f194944bb19afbf75f126c9970021aaa9 100644 (file)
@@ -179,7 +179,6 @@ int stats_accept(struct listener *l, int cfd, struct sockaddr_storage *addr)
        s->req->analysers = l->analysers;
 
        s->req->wto = TICK_ETERNITY;
-       s->req->cto = TICK_ETERNITY;
        s->req->rto = TICK_ETERNITY;
 
        if ((s->rep = pool_alloc2(pool2_buffer)) == NULL)
@@ -193,7 +192,6 @@ int stats_accept(struct listener *l, int cfd, struct sockaddr_storage *addr)
        s->si[0].ob = s->si[1].ib = s->rep;
 
        s->rep->rto = TICK_ETERNITY;
-       s->rep->cto = TICK_ETERNITY;
        s->rep->wto = TICK_ETERNITY;
 
        s->req->rex = TICK_ETERNITY;
index 04c3d9baad80c41ebc329eed96665208ec9ad603..a51231e50879e1dd307a987195f3c50792788492 100644 (file)
@@ -352,7 +352,6 @@ int frontend_accept(struct listener *l, int cfd, struct sockaddr_storage *addr)
 
        s->req->rto = s->fe->timeout.client;
        s->req->wto = s->be->timeout.server;
-       s->req->cto = s->be->timeout.connect;
 
        if (unlikely((s->rep = pool_alloc2(pool2_buffer)) == NULL))
                goto out_fail_rep; /* no memory */
@@ -366,7 +365,6 @@ int frontend_accept(struct listener *l, int cfd, struct sockaddr_storage *addr)
 
        s->rep->rto = s->be->timeout.server;
        s->rep->wto = s->fe->timeout.client;
-       s->rep->cto = TICK_ETERNITY;
 
        s->req->rex = TICK_ETERNITY;
        s->req->wex = TICK_ETERNITY;
index 5d8e229d31221597f0cc7c49c616f14e7780ea2e..b533c2d341f2a9940fa1b2889f76589f7b84171b 100644 (file)
@@ -6747,11 +6747,9 @@ void http_reset_txn(struct session *s)
 
        s->req->rto = s->fe->timeout.client;
        s->req->wto = s->be->timeout.server;
-       s->req->cto = s->be->timeout.connect;
 
        s->rep->rto = s->be->timeout.server;
        s->rep->wto = s->fe->timeout.client;
-       s->rep->cto = TICK_ETERNITY;
 
        s->req->rex = TICK_ETERNITY;
        s->req->wex = TICK_ETERNITY;
index 155d089e6337e1a9d2cee5d891cf579704bc77d2..6b038777d24e011896796e8cf682cd2fb7320f6f 100644 (file)
@@ -720,7 +720,6 @@ int session_set_backend(struct session *s, struct proxy *be)
 
        /* assign new parameters to the session from the new backend */
        s->rep->rto = s->req->wto = be->timeout.server;
-       s->req->cto = be->timeout.connect;
        s->conn_retries = be->conn_retries;
        s->si[1].flags &= ~SI_FL_INDEP_STR;
        if (be->options2 & PR_O2_INDEPSTR)