MINOR: conn-stream: Remove the stream-interface from the conn-stream
The stream-interface API is no longer used. Thus, it is removed from the
conn-stream. From now, stream-interfaces are now longer used !
diff --git a/src/cli.c b/src/cli.c
index ff1610e..1832ff7 100644
--- a/src/cli.c
+++ b/src/cli.c
@@ -2767,7 +2767,6 @@
sockaddr_free(&s->csb->dst);
cs_set_state(s->csb, CS_ST_INI);
- cs_si(s->csb)->flags &= SI_FL_ISBACK; /* we're in the context of process_stream */
s->csb->flags &= CS_FL_ISBACK | CS_FL_DONT_WAKE; /* we're in the context of process_stream */
s->req.flags &= ~(CF_SHUTW|CF_SHUTW_NOW|CF_AUTO_CONNECT|CF_WRITE_ERROR|CF_STREAMER|CF_STREAMER_FAST|CF_NEVER_WAIT|CF_WROTE_DATA);
s->res.flags &= ~(CF_SHUTR|CF_SHUTR_NOW|CF_READ_ATTACHED|CF_READ_ERROR|CF_READ_NOEXP|CF_STREAMER|CF_STREAMER_FAST|CF_WRITE_PARTIAL|CF_NEVER_WAIT|CF_WROTE_DATA|CF_READ_NULL);
diff --git a/src/conn_stream.c b/src/conn_stream.c
index c4dd8ab..c362145 100644
--- a/src/conn_stream.c
+++ b/src/conn_stream.c
@@ -19,7 +19,6 @@
#include <haproxy/http_ana.h>
#include <haproxy/pipe.h>
#include <haproxy/pool.h>
-#include <haproxy/stream_interface.h>
DECLARE_POOL(pool_head_connstream, "conn_stream", sizeof(struct conn_stream));
DECLARE_POOL(pool_head_cs_endpoint, "cs_endpoint", sizeof(struct cs_endpoint));
@@ -124,7 +123,6 @@
cs->state = CS_ST_INI;
cs->hcto = TICK_ETERNITY;
cs->app = NULL;
- cs->si = NULL;
cs->data_cb = NULL;
cs->src = NULL;
cs->dst = NULL;
@@ -186,12 +184,6 @@
return NULL;
cs->flags |= flags;
cs->endp->flags |= CS_EP_DETACHED;
- cs->si = si_new(cs);
- if (unlikely(!cs->si)) {
- cs_free(cs);
- return NULL;
- }
-
cs->app = &strm->obj_type;
cs->ops = &cs_app_embedded_ops;
cs->data_cb = NULL;
@@ -217,7 +209,6 @@
*/
void cs_free(struct conn_stream *cs)
{
- si_free(cs->si);
sockaddr_free(&cs->src);
sockaddr_free(&cs->dst);
if (cs->endp) {
@@ -279,19 +270,11 @@
int cs_attach_strm(struct conn_stream *cs, struct stream *strm)
{
cs->app = &strm->obj_type;
-
- cs->si = si_new(cs);
- if (unlikely(!cs->si))
- return -1;
-
cs->endp->flags &= ~CS_EP_ORPHAN;
if (cs->endp->flags & CS_EP_T_MUX) {
cs->wait_event.tasklet = tasklet_new();
- if (!cs->wait_event.tasklet) {
- si_free(cs->si);
- cs->si = NULL;
+ if (!cs->wait_event.tasklet)
return -1;
- }
cs->wait_event.tasklet->process = cs_conn_io_cb;
cs->wait_event.tasklet->context = cs;
cs->wait_event.events = 0;
@@ -363,7 +346,7 @@
* connection related for now but this will evolved
*/
cs->flags &= CS_FL_ISBACK;
- if (cs->si)
+ if (cs_strm(cs))
cs->ops = &cs_app_embedded_ops;
cs->data_cb = NULL;
@@ -373,9 +356,7 @@
void cs_detach_app(struct conn_stream *cs)
{
- si_free(cs->si);
cs->app = NULL;
- cs->si = NULL;
cs->data_cb = NULL;
sockaddr_free(&cs->src);
sockaddr_free(&cs->dst);
diff --git a/src/debug.c b/src/debug.c
index 62efca6..0075db6 100644
--- a/src/debug.c
+++ b/src/debug.c
@@ -693,7 +693,7 @@
if (!*args[3]) {
return cli_err(appctx,
"Usage: debug dev stream { <obj> <op> <value> | wake }*\n"
- " <obj> = {strm | strm.f | strm.x | sif.f | csf.s | sib.f | csb.s |\n"
+ " <obj> = {strm | strm.f | strm.x | csf.s | csb.s |\n"
" txn.f | req.f | req.r | req.w | res.f | res.r | res.w}\n"
" <op> = {'' (show) | '=' (assign) | '^' (xor) | '+' (or) | '-' (andnot)}\n"
" <value> = 'now' | 64-bit dec/hex integer (0x prefix supported)\n"
@@ -728,10 +728,6 @@
ptr = (!s || !may_access(s)) ? NULL : &s->req.wex; size = sizeof(s->req.wex);
} else if (isteq(name, ist("res.w"))) {
ptr = (!s || !may_access(s)) ? NULL : &s->res.wex; size = sizeof(s->res.wex);
- } else if (isteq(name, ist("sif.f"))) {
- ptr = (!s || !may_access(s)) ? NULL : &cs_si(s->csf)->flags; size = sizeof(cs_si(s->csf)->flags);
- } else if (isteq(name, ist("sib.f"))) {
- ptr = (!s || !may_access(s)) ? NULL : &cs_si(s->csb)->flags; size = sizeof(cs_si(s->csb)->flags);
} else if (isteq(name, ist("csf.s"))) {
ptr = (!s || !may_access(s)) ? NULL : &s->csf->state; size = sizeof(s->csf->state);
} else if (isteq(name, ist("csb.s"))) {