[CLEANUP] buffer->cto is not used anymore

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.
This commit is contained in:
Willy Tarreau 2010-05-31 11:27:58 +02:00
parent de3041d443
commit ace495e468
5 changed files with 1 additions and 9 deletions

View 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 */

View 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;

View 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;

View 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;

View 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)