MEDIUM: stream-int: remove any reference to the owner
si->owner is not used anymore now, so let's remove any reference to it.
diff --git a/include/proto/stream_interface.h b/include/proto/stream_interface.h
index 584abcf..745bbcb 100644
--- a/include/proto/stream_interface.h
+++ b/include/proto/stream_interface.h
@@ -124,11 +124,11 @@
}
/* initializes a stream interface in the SI_ST_INI state. It's detached from
- * any endpoint and is only attached to an owner (generally a task).
+ * any endpoint and only keeps its side which is expected to have already been
+ * set.
*/
-static inline void si_reset(struct stream_interface *si, void *owner)
+static inline void si_reset(struct stream_interface *si)
{
- si->owner = owner;
si->err_type = SI_ET_NONE;
si->conn_retries = 0; /* used for logging too */
si->exp = TICK_ETERNITY;
diff --git a/include/types/stream_interface.h b/include/types/stream_interface.h
index 9d81bbc..d8865d5 100644
--- a/include/types/stream_interface.h
+++ b/include/types/stream_interface.h
@@ -175,7 +175,6 @@
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, ... */
- 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 */
diff --git a/src/hlua.c b/src/hlua.c
index af53cea..83a8683 100644
--- a/src/hlua.c
+++ b/src/hlua.c
@@ -1994,7 +1994,7 @@
channel_auto_close(&socket->s->req); /* let the producer forward close requests */
socket->s->si[0].flags = SI_FL_NONE;
- si_reset(&socket->s->si[0], socket->s->task);
+ si_reset(&socket->s->si[0]);
si_set_state(&socket->s->si[0], SI_ST_EST); /* connection established (resource exists) */
appctx = stream_int_register_handler(&socket->s->si[0], &update_applet);
@@ -2010,7 +2010,7 @@
* with the "struct server".
*/
socket->s->si[1].flags = SI_FL_ISBACK;
- si_reset(&socket->s->si[1], socket->s->task);
+ si_reset(&socket->s->si[1]);
si_set_state(&socket->s->si[1], SI_ST_INI);
socket->s->si[1].conn_retries = socket_proxy.conn_retries;
diff --git a/src/peers.c b/src/peers.c
index b6f573e..10cc7ff 100644
--- a/src/peers.c
+++ b/src/peers.c
@@ -1166,7 +1166,7 @@
s->si[0].flags = SI_FL_NONE;
s->si[1].flags = SI_FL_ISBACK;
- si_reset(&s->si[0], t);
+ si_reset(&s->si[0]);
si_set_state(&s->si[0], SI_ST_EST);
if (s->fe->options2 & PR_O2_INDEPSTR)
@@ -1178,7 +1178,7 @@
appctx->st0 = PEER_SESS_ST_CONNECT;
appctx->ctx.peers.ptr = (void *)ps;
- si_reset(&s->si[1], t);
+ si_reset(&s->si[1]);
/* initiate an outgoing connection */
si_set_state(&s->si[1], SI_ST_ASS);
diff --git a/src/session.c b/src/session.c
index 7f726d4..ca8efca 100644
--- a/src/session.c
+++ b/src/session.c
@@ -458,7 +458,7 @@
}
/* this part should be common with other protocols */
- si_reset(&s->si[0], t);
+ si_reset(&s->si[0]);
si_set_state(&s->si[0], SI_ST_EST);
/* attach the incoming connection to the stream interface now.
@@ -474,7 +474,7 @@
/* pre-initialize the other side's stream interface to an INIT state. The
* callbacks will be initialized before attempting to connect.
*/
- si_reset(&s->si[1], t);
+ si_reset(&s->si[1]);
si_detach(&s->si[1]);
if (likely(s->fe->options2 & PR_O2_INDEPSTR))