]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: stream_interface: remove unused field err_loc
authorWilly Tarreau <w@1wt.eu>
Mon, 8 Jul 2013 14:16:22 +0000 (16:16 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 9 Dec 2013 14:40:21 +0000 (15:40 +0100)
This field was still fed with a pointer to the server that caught an
error but was not used anymore. Let's remove it.

include/types/stream_interface.h
src/backend.c
src/peers.c
src/proto_http.c
src/session.c

index 25008943c8d2bc64884e697279a2136f9aa0cc38..fe49371117fbf2424ef42bc904ca7fc65b4d96be 100644 (file)
@@ -107,7 +107,6 @@ struct stream_interface {
        unsigned int exp;       /* wake up time for connect, queue, turn-around, ... */
        void *owner;            /* generally a (struct task*) */
        unsigned int err_type;  /* first error detected, one of SI_ET_* */
-       void *err_loc;          /* commonly the server, NULL when SI_ET_NONE */
 
        struct connection *conn; /* descriptor for a connection */
        struct si_ops *ops;     /* general operations at the stream interface layer */
index c2e286a768fe3b6a307d162655833967ffa7a5e3..b8349174ac5c53c44d07b15fcb519130be09bdbc 100644 (file)
@@ -1072,7 +1072,6 @@ int srv_redispatch_connect(struct session *t)
 
                if (!t->req->cons->err_type) {
                        t->req->cons->err_type = SI_ET_QUEUE_ERR;
-                       t->req->cons->err_loc = srv;
                }
 
                srv->counters.failed_conns++;
@@ -1083,7 +1082,6 @@ int srv_redispatch_connect(struct session *t)
                /* note: it is guaranteed that srv == NULL here */
                if (!t->req->cons->err_type) {
                        t->req->cons->err_type = SI_ET_CONN_ERR;
-                       t->req->cons->err_loc = NULL;
                }
 
                t->be->be_counters.failed_conns++;
@@ -1099,7 +1097,6 @@ int srv_redispatch_connect(struct session *t)
        default:
                if (!t->req->cons->err_type) {
                        t->req->cons->err_type = SI_ET_CONN_OTHER;
-                       t->req->cons->err_loc = srv;
                }
 
                if (srv)
index 2c8d9cc6c0b3f70db1a625bb55ce80317b361179..0ed4b85a04c1990e30321629b04082cbc8bfa531 100644 (file)
@@ -1170,7 +1170,6 @@ static struct session *peer_session_create(struct peer *peer, struct peer_sessio
        s->si[0].owner = t;
        s->si[0].state = s->si[0].prev_state = SI_ST_EST;
        s->si[0].err_type = SI_ET_NONE;
-       s->si[0].err_loc = NULL;
        s->si[0].release = NULL;
        s->si[0].send_proxy_ofs = 0;
        s->si[0].conn->target = &l->obj_type;
@@ -1190,7 +1189,6 @@ static struct session *peer_session_create(struct peer *peer, struct peer_sessio
        s->si[1].state = s->si[1].prev_state = SI_ST_ASS;
        s->si[1].conn_retries = p->conn_retries;
        s->si[1].err_type = SI_ET_NONE;
-       s->si[1].err_loc = NULL;
        s->si[1].release = NULL;
        s->si[1].send_proxy_ofs = 0;
        s->si[1].conn->target = &s->be->obj_type;
index 51a43a4493b3bb3b4365eb23bccaa362e2706a96..acef3711e024f6562622cd83b90a036060f837be 100644 (file)
@@ -896,7 +896,6 @@ void http_perform_server_redirect(struct session *s, struct stream_interface *si
        si_shutr(si);
        si_shutw(si);
        si->err_type = SI_ET_NONE;
-       si->err_loc  = NULL;
        si->state    = SI_ST_CLO;
 
        /* send the message */
@@ -4481,7 +4480,6 @@ void http_end_txn_clean_session(struct session *s)
        s->req->cons->conn->err_code = CO_ER_NONE;
        s->req->cons->err_type  = SI_ET_NONE;
        s->req->cons->conn_retries = 0;  /* used for logging too */
-       s->req->cons->err_loc   = NULL;
        s->req->cons->exp       = TICK_ETERNITY;
        s->req->cons->flags     = SI_FL_NONE;
        s->req->flags &= ~(CF_SHUTW|CF_SHUTW_NOW|CF_AUTO_CONNECT|CF_WRITE_ERROR|CF_STREAMER|CF_STREAMER_FAST|CF_NEVER_WAIT);
index 5f94ad1b5be06f817b9ed8502242fff3eac4455d..ccdd90a24aa761e6b6c04520fc87763ee2d02d29 100644 (file)
@@ -442,7 +442,6 @@ int session_complete(struct session *s)
        s->si[0].owner     = t;
        s->si[0].state     = s->si[0].prev_state = SI_ST_EST;
        s->si[0].err_type  = SI_ET_NONE;
-       s->si[0].err_loc   = NULL;
        s->si[0].release   = NULL;
        s->si[0].send_proxy_ofs = 0;
        s->si[0].exp       = TICK_ETERNITY;
@@ -461,7 +460,6 @@ int session_complete(struct session *s)
        s->si[1].state     = s->si[1].prev_state = SI_ST_INI;
        s->si[1].err_type  = SI_ET_NONE;
        s->si[1].conn_retries = 0;  /* used for logging too */
-       s->si[1].err_loc   = NULL;
        s->si[1].release   = NULL;
        s->si[1].send_proxy_ofs = 0;
        s->si[1].conn->target = NULL;
@@ -791,7 +789,6 @@ static int sess_update_st_con_tcp(struct session *s, struct stream_interface *si
                        si->state    = SI_ST_EST;
                        si->err_type = SI_ET_DATA_ERR;
                        si->ib->flags |= CF_READ_ERROR | CF_WRITE_ERROR;
-                       si->err_loc = objt_server(s->target);
                        return 1;
                }
                si->exp   = TICK_ETERNITY;
@@ -806,7 +803,6 @@ static int sess_update_st_con_tcp(struct session *s, struct stream_interface *si
                if (si->err_type)
                        return 0;
 
-               si->err_loc = objt_server(s->target);
                if (si->flags & SI_FL_ERR)
                        si->err_type = SI_ET_CONN_ERR;
                else
@@ -823,7 +819,6 @@ static int sess_update_st_con_tcp(struct session *s, struct stream_interface *si
                /* give up */
                si_shutw(si);
                si->err_type |= SI_ET_CONN_ABRT;
-               si->err_loc  = objt_server(s->target);
                if (s->srv_error)
                        s->srv_error(s, si);
                return 1;
@@ -840,7 +835,6 @@ static int sess_update_st_con_tcp(struct session *s, struct stream_interface *si
        si->exp      = TICK_ETERNITY;
        si->state    = SI_ST_EST;
        si->err_type = SI_ET_NONE;
-       si->err_loc  = NULL;
        return 1;
 }
 
@@ -870,7 +864,6 @@ static int sess_update_st_cer(struct session *s, struct stream_interface *si)
        if (si->conn_retries < 0) {
                if (!si->err_type) {
                        si->err_type = SI_ET_CONN_ERR;
-                       si->err_loc = objt_server(s->target);
                }
 
                if (objt_server(s->target))
@@ -1005,7 +998,6 @@ static void sess_update_stream_int(struct session *s, struct stream_interface *s
                if (conn_err == SN_ERR_INTERNAL) {
                        if (!si->err_type) {
                                si->err_type = SI_ET_CONN_OTHER;
-                               si->err_loc  = srv;
                        }
 
                        if (srv)