]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MEDIUM: channel: remove now unused ->prod and ->cons pointers
authorWilly Tarreau <w@1wt.eu>
Fri, 28 Nov 2014 13:23:47 +0000 (14:23 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 11 Mar 2015 19:41:47 +0000 (20:41 +0100)
Nothing uses them anymore.

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

index 0c547dd74f22bc5e1444dd79be97b69663ea837a..05084bb66d0ce9706f67550333d752929e3cf68c 100644 (file)
@@ -82,7 +82,6 @@ static inline void channel_init(struct channel *chn)
        chn->total = 0;
        chn->pipe = NULL;
        chn->analysers = 0;
-       chn->cons = NULL;
        chn->flags = 0;
 }
 
index 6f52372a415b96fc4677b48a03d4f4afc9b33323..12ab2802ab7b5b8646db2a9b89db88c7fa500444 100644 (file)
@@ -24,7 +24,6 @@
 
 #include <common/config.h>
 #include <common/buffer.h>
-#include <types/stream_interface.h>
 
 /* The CF_* macros designate Channel Flags, which may be ORed in the bit field
  * member 'flags' in struct channel. Here we have several types of flags :
@@ -167,8 +166,6 @@ struct channel {
        unsigned int flags;             /* CF_* */
        unsigned int analysers;         /* bit field indicating what to do on the channel */
        struct buffer *buf;             /* buffer attached to the channel, always present but may move */
-       struct stream_interface *cons;  /* consumer attached to this channel */
-       struct stream_interface *prod;  /* producer attached to this channel */
        struct pipe *pipe;              /* non-NULL only when data present */
        unsigned int to_forward;        /* number of bytes to forward after out without a wake-up */
        unsigned short last_read;       /* 16 lower bits of last read date (max pause=65s) */
index aa6f9954e201f5943bf3081d45c725683aeed877..9711edc57f847622b5d70b0636a7a2d99271d91e 100644 (file)
@@ -1910,12 +1910,6 @@ __LJMP static int hlua_socket_new(lua_State *L)
        channel_init(&socket->s->res);
        socket->s->res.flags |= CF_ISRESP;
 
-       socket->s->req.prod = &socket->s->si[0];
-       socket->s->req.cons = &socket->s->si[1];
-
-       socket->s->res.prod = &socket->s->si[1];
-       socket->s->res.cons = &socket->s->si[0];
-
        socket->s->req.analysers = 0;
        socket->s->req.rto = socket_proxy.timeout.client;
        socket->s->req.wto = socket_proxy.timeout.server;
index 708c0196ca2c5d78a7eebcddc3bb08fe5f0f2e73..53e5035873ba3fbc05eca9b85fc487c48fe9876b 100644 (file)
@@ -1238,9 +1238,6 @@ static struct session *peer_session_create(struct peer *peer, struct peer_sessio
        txn->hdr_idx.size = txn->hdr_idx.used = 0;
 
        channel_init(&s->req);
-       s->req.prod = &s->si[0];
-       s->req.cons = &s->si[1];
-
        s->req.flags |= CF_READ_ATTACHED; /* the producer is already connected */
 
        /* activate default analysers enabled for this listener */
@@ -1258,9 +1255,6 @@ static struct session *peer_session_create(struct peer *peer, struct peer_sessio
        channel_init(&s->res);
        s->res.flags |= CF_ISRESP;
 
-       s->res.prod = &s->si[1];
-       s->res.cons = &s->si[0];
-
        s->res.rto = s->be->timeout.server;
        s->res.wto = s->fe->timeout.client;
 
index 4825cb3c1a77ba0d3d9d7f6b070ca39a84ea9d33..41b5af1be20955521b25012f76cc866efab2bc02 100644 (file)
@@ -488,8 +488,6 @@ int session_complete(struct session *s)
        s->store_count = 0;
 
        channel_init(&s->req);
-       s->req.prod = &s->si[0];
-       s->req.cons = &s->si[1];
        s->req.flags |= CF_READ_ATTACHED; /* the producer is already connected */
 
        /* activate default analysers enabled for this listener */
@@ -503,9 +501,6 @@ int session_complete(struct session *s)
 
        channel_init(&s->res);
        s->res.flags |= CF_ISRESP;
-
-       s->res.prod = &s->si[1];
-       s->res.cons = &s->si[0];
        s->res.analysers = 0;
 
        if (s->fe->options2 & PR_O2_NODELAY) {