MEDIUM: stream-int/conn-stream: Move stream-interface state in the conn-stream
The stream-interface state (SI_ST_*) is now in the conn-stream. It is a
mechanical replacement for now. Nothing special. SI_ST_* and SI_SB_* were
renamed accordingly. Utils functions to manipulate these infos were moved
under the conn-stream scope.
But it could be good to keep in mind that this part should be
reworked. Indeed, at the CS level, we only need to know if it is ready to
receive or to send. The state of conn-stream from INI to EST is only used on
the server side. The client CS is immediately set to EST. Thus current
SI_ST_* states should probably be moved to the stream to reflect the server
connection state during the establishment stage.
diff --git a/src/cache.c b/src/cache.c
index 5358b8b..8157631 100644
--- a/src/cache.c
+++ b/src/cache.c
@@ -1442,7 +1442,7 @@
res_htx = htx_from_buf(&res->buf);
total = res_htx->data;
- if (unlikely(cs->si->state == SI_ST_DIS || cs->si->state == SI_ST_CLO))
+ if (unlikely(cs->state == CS_ST_DIS || cs->state == CS_ST_CLO))
goto out;
/* Check if the input buffer is available. */