From 7be95eb892bd94e62f51a218e982c6b008919147 Mon Sep 17 00:00:00 2001 From: Christopher Faulet Date: Thu, 5 Mar 2026 17:28:10 +0100 Subject: [PATCH] MINOR: applet: Call sc_applet_process() instead of .wake() callback function At the end of task_run_applet() and task_process_applet(), instead of calling the app_ops .wake() callback function, we can directly call sc_applet_process(). At this stage, we know we are using an applet, so it is safe to do so. --- include/haproxy/stconn.h | 1 + src/applet.c | 4 ++-- src/stconn.c | 1 - 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/haproxy/stconn.h b/include/haproxy/stconn.h index 73e94c8f7..4b8ffd675 100644 --- a/include/haproxy/stconn.h +++ b/include/haproxy/stconn.h @@ -57,6 +57,7 @@ void sc_destroy(struct stconn *sc); int sc_reset_endp(struct stconn *sc); struct appctx *sc_applet_create(struct stconn *sc, struct applet *app); +int sc_applet_process(struct stconn *sc); void sc_conn_prepare_endp_upgrade(struct stconn *sc); void sc_conn_abort_endp_upgrade(struct stconn *sc); diff --git a/src/applet.c b/src/applet.c index 7b08539a3..58909b8a2 100644 --- a/src/applet.c +++ b/src/applet.c @@ -900,7 +900,7 @@ struct task *task_run_applet(struct task *t, void *context, unsigned int state) stream_dump_and_crash(&app->obj_type, read_freq_ctr(&app->call_rate)); } - sc->app_ops->wake(sc); + sc_applet_process(sc); channel_release_buffer(ic, &app->buffer_wait); TRACE_LEAVE(APPLET_EV_PROCESS, app); return t; @@ -993,7 +993,7 @@ struct task *task_process_applet(struct task *t, void *context, unsigned int sta stream_dump_and_crash(&app->obj_type, read_freq_ctr(&app->call_rate)); } - sc->app_ops->wake(sc); + sc_applet_process(sc); appctx_release_buffers(app); TRACE_LEAVE(APPLET_EV_PROCESS, app); return t; diff --git a/src/stconn.c b/src/stconn.c index 10ca9d865..c036a4612 100644 --- a/src/stconn.c +++ b/src/stconn.c @@ -50,7 +50,6 @@ static void sc_app_chk_snd_applet(struct stconn *sc); static int sc_conn_process(struct stconn *sc); static int sc_conn_recv(struct stconn *sc); static int sc_conn_send(struct stconn *sc); -static int sc_applet_process(struct stconn *sc); /* stream connector operations for connections */ struct sc_app_ops sc_app_conn_ops = {