BUG/MEDIUM: flt-spoe: Set/test applet flags instead of SE flags from I/O handler

The SPOE applet is using the new applet API. Thus end of input, end of
stream and errors must be reported using the applet flags, not the SE
flags. This was not the case. So let's fix it.

It seems this bug is harmless for now.

This patch must be backported to 3.1.
This commit is contained in:
Christopher Faulet
2025-02-04 10:42:19 +01:00
parent 54a09dfe0f
commit db504fbdbe

View File

@@ -490,7 +490,7 @@ static void spoe_handle_appctx(struct appctx *appctx)
if (!appctx_get_buf(appctx, &appctx->inbuf))
goto out;
if (unlikely(se_fl_test(appctx->sedesc, (SE_FL_EOS|SE_FL_ERROR)))) {
if (unlikely(applet_fl_test(appctx, APPCTX_FL_EOS|APPCTX_FL_ERROR))) {
b_reset(&appctx->inbuf);
applet_fl_clr(appctx, APPCTX_FL_INBLK_FULL);
goto out;
@@ -509,11 +509,11 @@ static void spoe_handle_appctx(struct appctx *appctx)
case SPOE_APPCTX_ST_EXIT:
appctx->st0 = SPOE_APPCTX_ST_END;
se_fl_set(appctx->sedesc, SE_FL_EOS);
applet_set_eos(appctx);
if (SPOE_APPCTX(appctx)->status_code != SPOP_ERR_NONE)
se_fl_set(appctx->sedesc, SE_FL_ERROR);
applet_set_error(appctx);
else
se_fl_set(appctx->sedesc, SE_FL_EOI);
applet_set_eoi(appctx);
__fallthrough;
case SPOE_APPCTX_ST_END: