MINOR: applet: Always use applet API to set appctx flags

Some appctx flags were still set manually while there is a dedicated
function to do so. Be sure to always use applet_fl_set() to set appctx
flags.
This commit is contained in:
Christopher Faulet 2024-02-15 11:23:00 +01:00
parent 94b8ed446f
commit d2403a412c
3 changed files with 6 additions and 6 deletions

View File

@ -269,7 +269,7 @@ struct appctx *appctx_new_on(struct applet *applet, struct sedesc *sedesc, int t
if (applet->rcv_buf != NULL && applet->snd_buf != NULL) {
appctx->t->process = task_process_applet;
appctx->flags |= APPCTX_FL_INOUT_BUFS;
applet_fl_set(appctx, APPCTX_FL_INOUT_BUFS);
}
else
appctx->t->process = task_run_applet;

View File

@ -1784,7 +1784,7 @@ static void http_cache_io_handler(struct appctx *appctx)
goto exit;
if (!appctx_get_buf(appctx, &appctx->outbuf)) {
appctx->flags |= APPCTX_FL_OUTBLK_ALLOC;
applet_fl_set(appctx, APPCTX_FL_OUTBLK_ALLOC);
goto exit;
}
@ -1842,7 +1842,7 @@ static void http_cache_io_handler(struct appctx *appctx)
if (len) {
ret = htx_cache_dump_msg(appctx, res_htx, len, HTX_BLK_UNUSED);
if (ret < len) {
appctx->flags |= APPCTX_FL_OUTBLK_FULL;
applet_fl_set(appctx, APPCTX_FL_OUTBLK_FULL);
goto out;
}
}

View File

@ -335,7 +335,7 @@ int stats_is_full(struct appctx *appctx, struct buffer *buf, struct htx *htx)
{
if (htx) {
if (htx_almost_full(htx)) {
appctx->flags |= APPCTX_FL_OUTBLK_FULL;
applet_fl_set(appctx, APPCTX_FL_OUTBLK_FULL);
goto full;
}
}
@ -4503,7 +4503,7 @@ static void http_stats_io_handler(struct appctx *appctx)
goto out;
if (!appctx_get_buf(appctx, &appctx->outbuf)) {
appctx->flags |= APPCTX_FL_OUTBLK_ALLOC;
applet_fl_set(appctx, APPCTX_FL_OUTBLK_ALLOC);
goto out;
}
@ -4557,7 +4557,7 @@ static void http_stats_io_handler(struct appctx *appctx)
*/
if (htx_is_empty(res_htx)) {
if (!htx_add_endof(res_htx, HTX_BLK_EOT)) {
appctx->flags |= APPCTX_FL_OUTBLK_FULL;
applet_fl_set(appctx, APPCTX_FL_OUTBLK_FULL);
goto out;
}
}