return !(si->flags & SI_FL_RX_WAIT_EP);
}
-/* Report that a stream interface wants to put some data into the input buffer */
-static inline void si_want_put(struct stream_interface *si)
-{
- si->flags &= ~SI_FL_RX_WAIT_EP;
-}
-
/* Report that a stream interface failed to put some data into the input buffer */
static inline void si_cant_put(struct stream_interface *si)
{
si->flags &= ~SI_FL_RX_WAIT_EP;
}
-/* Report that a stream interface doesn't want to put data into the input buffer */
-static inline void si_stop_put(struct stream_interface *si)
+/* Report that a stream interface won't put any more data into the input buffer */
+static inline void si_done_put(struct stream_interface *si)
{
+ si->flags &= ~SI_FL_RXBLK_ROOM;
si->flags |= SI_FL_RX_WAIT_EP;
}
-/* Report that a stream interface won't put any more data into the input buffer */
-static inline void si_done_put(struct stream_interface *si)
+/* The stream interface announces it is ready to try to deliver more data to the input buffer */
+static inline void si_rx_endp_more(struct stream_interface *si)
+{
+ si->flags &= ~SI_FL_RX_WAIT_EP;
+}
+
+/* The stream interface announces it doesn't have more data for the input buffer */
+static inline void si_rx_endp_done(struct stream_interface *si)
{
- si->flags &= ~SI_FL_RXBLK_ROOM;
si->flags |= SI_FL_RX_WAIT_EP;
}
* that one applet which ignores any event will not spin.
*/
si_cant_get(si);
- si_stop_put(si);
+ si_rx_endp_done(si);
/* Now we'll try to allocate the input buffer. We wake up the applet in
* all cases. So this is the applet's responsibility to check if this
* do if it needs the buffer, it will be called again upon readiness.
*/
if (!si_alloc_ibuf(si, &app->buffer_wait))
- si_want_put(si);
+ si_rx_endp_more(si);
app->applet->fct(app);
si_applet_wake_cb(si);
spoe_wakeup_appctx(struct appctx *appctx)
{
si_want_get(appctx->owner);
- si_want_put(appctx->owner);
+ si_rx_endp_more(appctx->owner);
appctx_wakeup(appctx);
return 1;
}
int ret;
if (si->state <= SI_ST_CON) {
- si_want_put(si);
+ si_rx_endp_more(si);
task_wakeup(si_strm(si)->task, TASK_WOKEN_MSG);
goto stop;
}
rep->analysers |= AN_RES_FLT_HTTP_HDRS;
}
- si_want_put(si);
+ si_rx_endp_more(si);
rep->flags |= CF_READ_ATTACHED; /* producer is now attached */
if (req->flags & CF_WAKE_CONNECT) {
req->flags |= CF_WAKE_ONCE;