]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MEDIUM: stream-interface: remove now unused pointers to channels
authorWilly Tarreau <w@1wt.eu>
Fri, 28 Nov 2014 10:53:35 +0000 (11:53 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 11 Mar 2015 19:41:46 +0000 (20:41 +0100)
Everyone must now use si_ic() / si_oc() to find the relevant channels,
the points have been totally removed.

include/types/stream_interface.h
src/hlua.c
src/peers.c
src/session.c

index 49507a4f15be77ee1bd5051509130fd8aad47525..9d81bbc8c62f9543858fed0a9bb97a920bdeae30 100644 (file)
@@ -2,7 +2,7 @@
  * include/types/stream_interface.h
  * This file describes the stream_interface struct and associated constants.
  *
- * Copyright (C) 2000-2011 Willy Tarreau - w@1wt.eu
+ * Copyright (C) 2000-2014 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
@@ -25,8 +25,6 @@
 #include <stdlib.h>
 #include <sys/socket.h>
 
-#include <types/channel.h>
-#include <types/connection.h>
 #include <types/hlua.h>
 #include <types/obj_type.h>
 #include <common/config.h>
@@ -177,7 +175,6 @@ struct stream_interface {
        enum si_state prev_state;/* SI_ST*, copy of previous state */
        unsigned short flags;    /* SI_FL_* */
        unsigned int exp;       /* wake up time for connect, queue, turn-around, ... */
-       struct channel *ib, *ob; /* input and output buffers */
        void *owner;            /* generally a (struct task*) */
        enum obj_type *end;     /* points to the end point (connection or appctx) */
        struct si_ops *ops;     /* general operations at the stream interface layer */
index e899f08ca68b7a221113ac596fc9e0f46832477e..af53cea677a00352f3f0825383d4d3fae56d074c 100644 (file)
@@ -1915,12 +1915,6 @@ __LJMP static int hlua_socket_new(lua_State *L)
        socket->s->res.prod = &socket->s->si[1];
        socket->s->res.cons = &socket->s->si[0];
 
-       socket->s->si[0].ib = &socket->s->req;
-       socket->s->si[0].ob = &socket->s->res;
-
-       socket->s->si[1].ib = &socket->s->res;
-       socket->s->si[1].ob = &socket->s->req;
-
        socket->s->req.analysers = 0;
        socket->s->req.rto = socket_proxy.timeout.client;
        socket->s->req.wto = socket_proxy.timeout.server;
index d16331d9968e2e9fc1385bcdd6c19046e297e3d7..b6f573e1db82e4ab30450ed8ef824b0aa931fa10 100644 (file)
@@ -1240,7 +1240,6 @@ static struct session *peer_session_create(struct peer *peer, struct peer_sessio
        channel_init(&s->req);
        s->req.prod = &s->si[0];
        s->req.cons = &s->si[1];
-       s->si[0].ib = s->si[1].ob = &s->req;
 
        s->req.flags |= CF_READ_ATTACHED; /* the producer is already connected */
 
@@ -1259,7 +1258,6 @@ static struct session *peer_session_create(struct peer *peer, struct peer_sessio
        channel_init(&s->res);
        s->res.prod = &s->si[1];
        s->res.cons = &s->si[0];
-       s->si[0].ob = s->si[1].ib = &s->res;
 
        s->res.rto = s->be->timeout.server;
        s->res.wto = s->fe->timeout.client;
index c06e29f50f8473b75da3ff49d1e08b5899c09e8e..f271e41261e4fd793e736781d1ff4af2131c5022 100644 (file)
@@ -490,7 +490,6 @@ int session_complete(struct session *s)
        channel_init(&s->req);
        s->req.prod = &s->si[0];
        s->req.cons = &s->si[1];
-       s->si[0].ib = s->si[1].ob = &s->req;
        s->req.flags |= CF_READ_ATTACHED; /* the producer is already connected */
 
        /* activate default analysers enabled for this listener */
@@ -505,7 +504,6 @@ int session_complete(struct session *s)
        channel_init(&s->res);
        s->res.prod = &s->si[1];
        s->res.cons = &s->si[0];
-       s->si[0].ob = s->si[1].ib = &s->res;
        s->res.analysers = 0;
 
        if (s->fe->options2 & PR_O2_NODELAY) {