CLEANUP: applet: rename struct si_applet to applet
Since this one does not depend on stream_interface anymore, remove the
"si_" prefix.
diff --git a/include/proto/applet.h b/include/proto/applet.h
index 61bca02..fd458d4 100644
--- a/include/proto/applet.h
+++ b/include/proto/applet.h
@@ -42,7 +42,7 @@
* pool_free2(connection) or appctx_free(), since it's allocated from the
* connection pool. <applet> is assigned as the applet, but it can be NULL.
*/
-static inline struct appctx *appctx_new(struct si_applet *applet)
+static inline struct appctx *appctx_new(struct applet *applet)
{
struct appctx *appctx;
diff --git a/include/proto/dumpstats.h b/include/proto/dumpstats.h
index cbbb802..2bdc3b1 100644
--- a/include/proto/dumpstats.h
+++ b/include/proto/dumpstats.h
@@ -54,7 +54,7 @@
#define STAT_SCOPE_INPUT_NAME "scope" /* pattern form scope name <input> in html form */
#define STAT_SCOPE_PATTERN "?" STAT_SCOPE_INPUT_NAME "="
-extern struct si_applet http_stats_applet;
+extern struct applet http_stats_applet;
void stats_io_handler(struct stream_interface *si);
diff --git a/include/proto/obj_type.h b/include/proto/obj_type.h
index 6d6577c..b64244f 100644
--- a/include/proto/obj_type.h
+++ b/include/proto/obj_type.h
@@ -95,12 +95,12 @@
return __objt_server(t);
}
-static inline struct si_applet *__objt_applet(enum obj_type *t)
+static inline struct applet *__objt_applet(enum obj_type *t)
{
- return container_of(t, struct si_applet, obj_type);
+ return container_of(t, struct applet, obj_type);
}
-static inline struct si_applet *objt_applet(enum obj_type *t)
+static inline struct applet *objt_applet(enum obj_type *t)
{
if (!t || *t != OBJ_TYPE_APPLET)
return NULL;
diff --git a/include/proto/stream_interface.h b/include/proto/stream_interface.h
index 2645961..036a4e1 100644
--- a/include/proto/stream_interface.h
+++ b/include/proto/stream_interface.h
@@ -44,7 +44,7 @@
extern struct data_cb si_conn_cb;
extern struct data_cb si_idle_conn_cb;
-struct appctx *stream_int_register_handler(struct stream_interface *si, struct si_applet *app);
+struct appctx *stream_int_register_handler(struct stream_interface *si, struct applet *app);
void stream_int_unregister_handler(struct stream_interface *si);
/* returns the channel which receives data from this stream interface (input channel) */
@@ -274,7 +274,7 @@
* and returned. NULL may be returned upon memory shortage. Applet <applet>
* is assigned to the appctx, but it may be NULL.
*/
-static inline struct appctx *si_alloc_appctx(struct stream_interface *si, struct si_applet *applet)
+static inline struct appctx *si_alloc_appctx(struct stream_interface *si, struct applet *applet)
{
struct appctx *appctx;
diff --git a/include/types/applet.h b/include/types/applet.h
index 9146ee4..5e989f6 100644
--- a/include/types/applet.h
+++ b/include/types/applet.h
@@ -30,7 +30,7 @@
struct appctx;
/* Applet descriptor */
-struct si_applet {
+struct applet {
enum obj_type obj_type; /* object type = OBJ_TYPE_APPLET */
/* 3 unused bytes here */
char *name; /* applet's name to report in logs */
@@ -45,7 +45,7 @@
unsigned int st0; /* CLI state for stats, session state for peers */
unsigned int st1; /* prompt for stats, session error for peers */
unsigned int st2; /* output state for stats, unused by peers */
- struct si_applet *applet; /* applet this context refers to */
+ struct applet *applet; /* applet this context refers to */
void *owner; /* pointer to upper layer's entity (eg: stream interface) */
union {
diff --git a/include/types/obj_type.h b/include/types/obj_type.h
index aefbcd3..83a3e78 100644
--- a/include/types/obj_type.h
+++ b/include/types/obj_type.h
@@ -36,7 +36,7 @@
OBJ_TYPE_LISTENER, /* object is a struct listener */
OBJ_TYPE_PROXY, /* object is a struct proxy */
OBJ_TYPE_SERVER, /* object is a struct server */
- OBJ_TYPE_APPLET, /* object is a struct si_applet */
+ OBJ_TYPE_APPLET, /* object is a struct applet */
OBJ_TYPE_APPCTX, /* object is a struct appctx */
OBJ_TYPE_CONN, /* object is a struct connection */
OBJ_TYPE_ENTRIES /* last one : number of entries */
diff --git a/src/dumpstats.c b/src/dumpstats.c
index d416ad0..0a2bd67 100644
--- a/src/dumpstats.c
+++ b/src/dumpstats.c
@@ -164,7 +164,7 @@
* -> stats_dump_html_end() // emits HTML trailer
*/
-static struct si_applet cli_applet;
+static struct applet cli_applet;
static const char stats_sock_usage_msg[] =
"Unknown command. Please enter one of the following commands only :\n"
@@ -6217,14 +6217,14 @@
return 0;
}
-struct si_applet http_stats_applet = {
+struct applet http_stats_applet = {
.obj_type = OBJ_TYPE_APPLET,
.name = "<STATS>", /* used for logging */
.fct = http_stats_io_handler,
.release = NULL,
};
-static struct si_applet cli_applet = {
+static struct applet cli_applet = {
.obj_type = OBJ_TYPE_APPLET,
.name = "<CLI>", /* used for logging */
.fct = cli_io_handler,
diff --git a/src/hlua.c b/src/hlua.c
index 4bc32e7..68f0a39 100644
--- a/src/hlua.c
+++ b/src/hlua.c
@@ -2024,7 +2024,7 @@
}
/* This struct define the applet. */
-static struct si_applet update_applet = {
+static struct applet update_applet = {
.obj_type = OBJ_TYPE_APPLET,
.name = "<LUA_TCP>",
.fct = hlua_socket_handler,
diff --git a/src/peers.c b/src/peers.c
index 7683150..2a927e0 100644
--- a/src/peers.c
+++ b/src/peers.c
@@ -1055,7 +1055,7 @@
goto out;
}
-static struct si_applet peer_applet = {
+static struct applet peer_applet = {
.obj_type = OBJ_TYPE_APPLET,
.name = "<PEER>", /* used for logging */
.fct = peer_io_handler,
diff --git a/src/stream_interface.c b/src/stream_interface.c
index ad865ca..28d6514 100644
--- a/src/stream_interface.c
+++ b/src/stream_interface.c
@@ -372,7 +372,7 @@
* function itself. It also pre-initializes the applet's context and
* returns it (or NULL in case it could not be allocated).
*/
-struct appctx *stream_int_register_handler(struct stream_interface *si, struct si_applet *app)
+struct appctx *stream_int_register_handler(struct stream_interface *si, struct applet *app)
{
struct appctx *appctx;