MEDIUM: stream-int/conn-stream: Move blocking flags from SI to CS
Remaining flags and associated functions are move in the conn-stream
scope. These flags are added on the endpoint and not the conn-stream
itself. This way it will be possible to get them from the mux or the
applet. The functions to get or set these flags are renamed accordingly with
the "cs_" prefix and updated to manipualte a conn-stream instead of a
stream-interface.
diff --git a/src/peers.c b/src/peers.c
index a6544a2..a366e2f 100644
--- a/src/peers.c
+++ b/src/peers.c
@@ -1186,7 +1186,7 @@
if (ret <= 0) {
if (ret == -1) {
/* No more write possible */
- si_rx_room_blk(cs->si);
+ cs_rx_room_blk(cs);
return -1;
}
appctx->st0 = PEER_SESS_ST_END;
@@ -2833,7 +2833,7 @@
/* Check if the input buffer is available. */
if (cs_ib(cs)->size == 0) {
- si_rx_room_blk(cs->si);
+ cs_rx_room_blk(cs);
goto out;
}
@@ -3205,7 +3205,7 @@
s = DISGUISE(cs_strm(cs));
/* applet is waiting for data */
- si_cant_get(cs_si(s->csf));
+ cs_cant_get(s->csf);
appctx_wakeup(appctx);
/* initiate an outgoing connection */
@@ -3756,7 +3756,7 @@
peers->sync_task ? peers->sync_task->calls : 0);
if (ci_putchk(cs_ic(cs), msg) == -1) {
- si_rx_room_blk(cs->si);
+ cs_rx_room_blk(cs);
return 0;
}
@@ -3915,7 +3915,7 @@
end:
chunk_appendf(&trash, "\n");
if (ci_putchk(cs_ic(cs), msg) == -1) {
- si_rx_room_blk(cs->si);
+ cs_rx_room_blk(cs);
return 0;
}