From: Willy Tarreau Date: Mon, 31 May 2010 09:27:58 +0000 (+0200) Subject: [CLEANUP] buffer->cto is not used anymore X-Git-Tag: v1.5-dev8~588 X-Git-Url: http://git.kaiwu.me/postgresql/log/contrib/postgres_fdw/static/gitweb.js?a=commitdiff_plain;h=ace495e46816d40862ad0ba6b9619ac53b5c9449;p=haproxy.git [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. --- diff --git a/include/types/buffers.h b/include/types/buffers.h index 59e6d2960..6ed8ca6a9 100644 --- a/include/types/buffers.h +++ b/include/types/buffers.h @@ -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 */ diff --git a/src/dumpstats.c b/src/dumpstats.c index 1856f2111..bbda255f1 100644 --- a/src/dumpstats.c +++ b/src/dumpstats.c @@ -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; diff --git a/src/frontend.c b/src/frontend.c index 04c3d9baa..a51231e50 100644 --- a/src/frontend.c +++ b/src/frontend.c @@ -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; diff --git a/src/proto_http.c b/src/proto_http.c index 5d8e229d3..b533c2d34 100644 --- a/src/proto_http.c +++ b/src/proto_http.c @@ -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; diff --git a/src/proxy.c b/src/proxy.c index 155d089e6..6b038777d 100644 --- a/src/proxy.c +++ b/src/proxy.c @@ -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)