SHOW_FLAG(f, SE_FL_RXBLK_CHAN);
SHOW_FLAG(f, SE_FL_RXBLK_BUFF);
SHOW_FLAG(f, SE_FL_RXBLK_ROOM);
- SHOW_FLAG(f, SE_FL_RXBLK_CONN);
+ SHOW_FLAG(f, SE_FL_APPLET_NEED_CONN);
SHOW_FLAG(f, SE_FL_RX_WAIT_EP);
SHOW_FLAG(f, SE_FL_WANT_GET);
SHOW_FLAG(f, SE_FL_WAIT_DATA);
SE_FL_RXBLK_BUFF = 0x08000000, /* CS waits for a buffer allocation to complete */
SE_FL_RXBLK_ROOM = 0x10000000, /* CS waits for more buffer room to store incoming data */
/* unused 0x20000000,*/
- SE_FL_RXBLK_CONN = 0x40000000, /* other side is not connected */
+ SE_FL_APPLET_NEED_CONN = 0x40000000, /* applet is waiting for the other side to (fail to) connect */
SE_FL_RXBLK_ANY = 0x5C000000, /* any of the RXBLK flags above */
SE_FL_APP_MASK = 0x5fe00000, /* Mask for flags set by the app layer */
};
sc_ep_set(cs, SE_FL_RXBLK_CHAN);
}
-/* Tell a stream connector the other side is connected */
-static inline void cs_rx_conn_rdy(struct stconn *cs)
-{
- sc_ep_clr(cs, SE_FL_RXBLK_CONN);
-}
-
-/* Tell a stream connector it must wait for the other side to connect */
-static inline void cs_rx_conn_blk(struct stconn *cs)
+/* An frontend (applet) stream endpoint tells the connector it needs the other
+ * side to connect or fail before continuing to work. This is used for example
+ * to allow an applet not to deliver data to a request channel before a
+ * connection is confirmed.
+ */
+static inline void se_need_remote_conn(struct sedesc *se)
{
- sc_ep_set(cs, SE_FL_RXBLK_CONN);
+ se_fl_set(se, SE_FL_APPLET_NEED_CONN);
}
/* The stream connector just got the input buffer it was waiting for */
{
struct channel *ic = sc_ic(cs);
- if (sc_ep_test(cs, SE_FL_RXBLK_CONN) && cs_state_in(cs_opposite(cs)->state, SC_SB_RDY|SC_SB_EST|SC_SB_DIS|SC_SB_CLO))
- cs_rx_conn_rdy(cs);
+ if (sc_ep_test(cs, SE_FL_APPLET_NEED_CONN) && cs_state_in(cs_opposite(cs)->state, SC_SB_RDY|SC_SB_EST|SC_SB_DIS|SC_SB_CLO))
+ sc_ep_clr(cs, SE_FL_APPLET_NEED_CONN);
if (ic->flags & CF_SHUTR)
return;
*/
if (cs_opposite(cs)->state < SC_ST_EST) {
cs_cant_get(cs);
- cs_rx_conn_blk(cs);
+ se_need_remote_conn(appctx->sedesc);
cs_rx_endp_more(cs);
return;
}
*/
if (cs_opposite(cs)->state < SC_ST_EST) {
cs_cant_get(cs);
- cs_rx_conn_blk(cs);
+ se_need_remote_conn(appctx->sedesc);
cs_rx_endp_more(cs);
return;
}
*/
if (cs_opposite(cs)->state < SC_ST_EST) {
cs_cant_get(cs);
- cs_rx_conn_blk(cs);
+ se_need_remote_conn(appctx->sedesc);
cs_rx_endp_more(cs);
return;
}
*/
if (cs_opposite(cs)->state < SC_ST_EST) {
cs_cant_get(cs);
- cs_rx_conn_blk(cs);
+ se_need_remote_conn(appctx->sedesc);
cs_rx_endp_more(cs);
return;
}