CLEANUP: conn-stream: rename cs_register_applet() to cs_applet_create()
cs_register_applet() was not a good name because it suggests it happens
during startup, just like any other registration mechanisms..
diff --git a/include/haproxy/conn_stream.h b/include/haproxy/conn_stream.h
index ab2809d..ee5a3de 100644
--- a/include/haproxy/conn_stream.h
+++ b/include/haproxy/conn_stream.h
@@ -51,7 +51,7 @@
void cs_detach_endp(struct conn_stream *cs);
void cs_detach_app(struct conn_stream *cs);
-struct appctx *cs_register_applet(struct conn_stream *cs, struct applet *app);
+struct appctx *cs_applet_create(struct conn_stream *cs, struct applet *app);
void cs_applet_release(struct conn_stream *cs);
/* Returns the endpoint target without any control */
diff --git a/src/backend.c b/src/backend.c
index ec45c71..8255ffb 100644
--- a/src/backend.c
+++ b/src/backend.c
@@ -2130,7 +2130,7 @@
struct appctx *appctx = cs_appctx(s->csb);
if (!appctx || appctx->applet != __objt_applet(s->target))
- appctx = cs_register_applet(cs, objt_applet(s->target));
+ appctx = cs_applet_create(cs, objt_applet(s->target));
if (!appctx) {
/* No more memory, let's immediately abort. Force the
diff --git a/src/cache.c b/src/cache.c
index 347b6eb..94f4e7c 100644
--- a/src/cache.c
+++ b/src/cache.c
@@ -1815,7 +1815,7 @@
}
s->target = &http_cache_applet.obj_type;
- if ((appctx = cs_register_applet(s->csb, objt_applet(s->target)))) {
+ if ((appctx = cs_applet_create(s->csb, objt_applet(s->target)))) {
appctx->st0 = HTX_CACHE_INIT;
appctx->rule = rule;
appctx->ctx.cache.entry = res;
diff --git a/src/conn_stream.c b/src/conn_stream.c
index 572c13e..7adf04b 100644
--- a/src/conn_stream.c
+++ b/src/conn_stream.c
@@ -448,13 +448,13 @@
}
-/* Register an applet to handle a conn-stream as a new appctx. The CS will
+/* Create an applet to handle a conn-stream as a new appctx. The CS will
* wake it up every time it is solicited. The appctx must be deleted by the task
* handler using cs_detach_endp(), possibly from within the function itself.
* It also pre-initializes the applet's context and returns it (or NULL in case
* it could not be allocated).
*/
-struct appctx *cs_register_applet(struct conn_stream *cs, struct applet *app)
+struct appctx *cs_applet_create(struct conn_stream *cs, struct applet *app)
{
struct appctx *appctx;
diff --git a/src/http_ana.c b/src/http_ana.c
index 888aa12..7cbec58 100644
--- a/src/http_ana.c
+++ b/src/http_ana.c
@@ -422,7 +422,7 @@
*/
if (!s->target && http_stats_check_uri(s, txn, px)) {
s->target = &http_stats_applet.obj_type;
- if (unlikely(!cs_register_applet(s->csb, objt_applet(s->target)))) {
+ if (unlikely(!cs_applet_create(s->csb, objt_applet(s->target)))) {
s->logs.tv_request = now;
if (!(s->flags & SF_ERR_MASK))
s->flags |= SF_ERR_RESOURCE;
diff --git a/src/stream.c b/src/stream.c
index 67afbfd..a9b7cea 100644
--- a/src/stream.c
+++ b/src/stream.c
@@ -1005,7 +1005,7 @@
if (flags & ACT_OPT_FIRST) {
/* Register applet. this function schedules the applet. */
s->target = &rule->applet.obj_type;
- appctx = cs_register_applet(s->csb, objt_applet(s->target));
+ appctx = cs_applet_create(s->csb, objt_applet(s->target));
if (unlikely(!appctx))
return ACT_RET_ERR;