REORG: connection: move the target pointer from si to connection
The target is per connection and is directly used by the connection, so
we need it there. It's not needed anymore in the SI however.
diff --git a/src/peers.c b/src/peers.c
index 312c248..eb9b13b 100644
--- a/src/peers.c
+++ b/src/peers.c
@@ -1052,8 +1052,8 @@
{
struct stream_interface *oldsi;
- if (session->si[0].target.type == TARG_TYPE_APPLET &&
- session->si[0].target.ptr.a == &peer_applet) {
+ if (session->si[0].conn.target.type == TARG_TYPE_APPLET &&
+ session->si[0].conn.target.ptr.a == &peer_applet) {
oldsi = &session->si[0];
}
else {
@@ -1077,7 +1077,7 @@
{
/* we have a dedicated I/O handler for the stats */
stream_int_register_handler(&s->si[1], &peer_applet);
- copy_target(&s->target, &s->si[1].target); // for logging only
+ copy_target(&s->target, &s->si[1].conn.target); // for logging only
s->si[1].conn.data_ctx = s;
s->si[1].applet.st0 = PEER_SESSION_ACCEPT;
@@ -1158,7 +1158,7 @@
s->si[0].err_loc = NULL;
s->si[0].release = NULL;
s->si[0].send_proxy_ofs = 0;
- set_target_client(&s->si[0].target, l);
+ set_target_client(&s->si[0].conn.target, l);
s->si[0].exp = TICK_ETERNITY;
s->si[0].flags = SI_FL_NONE;
if (s->fe->options2 & PR_O2_INDEPSTR)
@@ -1179,7 +1179,7 @@
s->si[1].err_loc = NULL;
s->si[1].release = NULL;
s->si[1].send_proxy_ofs = 0;
- set_target_proxy(&s->si[1].target, s->be);
+ set_target_proxy(&s->si[1].conn.target, s->be);
si_prepare_conn(&s->si[1], peer->proto, peer->data);
s->si[1].exp = TICK_ETERNITY;
s->si[1].flags = SI_FL_NONE;