]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: applet: rename struct si_applet to applet
authorWilly Tarreau <w@1wt.eu>
Mon, 13 Apr 2015 11:50:30 +0000 (13:50 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 23 Apr 2015 15:56:16 +0000 (17:56 +0200)
Since this one does not depend on stream_interface anymore, remove the
"si_" prefix.

include/proto/applet.h
include/proto/dumpstats.h
include/proto/obj_type.h
include/proto/stream_interface.h
include/types/applet.h
include/types/obj_type.h
src/dumpstats.c
src/hlua.c
src/peers.c
src/stream_interface.c

index 61bca0259f3a6951e9af3a8512dfcdff0a2a691b..fd458d492f1b10b64a0fd091d5c3c5a5b9eca70e 100644 (file)
@@ -42,7 +42,7 @@ static inline void appctx_init(struct appctx *appctx)
  * 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;
 
index cbbb802a475b4dbf1909db176ac8c8f3651eb290..2bdc3b1a82c62fba230ac8b9e227605816133819 100644 (file)
@@ -54,7 +54,7 @@ enum {
 #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);
 
index 6d6577cb68fc31d8230f0cc16ba37d54686e0129..b64244fcc301e8a2dec87aa2156dc3909b85ff37 100644 (file)
@@ -95,12 +95,12 @@ static inline struct server *objt_server(enum obj_type *t)
        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;
index 264596166cac6228ca1751fe6f7b4c2df063d984..036a4e1fead1026f9d868ae0292a911fb021f3c3 100644 (file)
@@ -44,7 +44,7 @@ extern struct si_ops si_conn_ops;
 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 @@ static inline struct connection *si_alloc_conn(struct stream_interface *si, int
  * 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;
 
index 9146ee4fdedc88f4d293409ba42e9d6500cab9ad..5e989f6bc03f98ddaeba521295e58d6b736c0b23 100644 (file)
@@ -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 @@ struct appctx {
        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 {
index aefbcd3a164a1edaeff7ad81189b7f7a5cca098a..83a3e78268784aa951d99dcf6089912eef3d55eb 100644 (file)
@@ -36,7 +36,7 @@ enum obj_type {
        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 */
index d416ad006ef8791b1bad907b8be11a6f80497732..0a2bd6747d60fe4e8d55c4eb1516a90ca34eb5eb 100644 (file)
@@ -164,7 +164,7 @@ static void cli_release_handler(struct appctx *appctx);
  *        -> 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 @@ static int bind_parse_level(char **args, int cur_arg, struct proxy *px, struct b
        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,
index 4bc32e75110197079eeba3ee44ac237cee7ef522..68f0a3928ea02e9e3498efc165003fb145bc5616 100644 (file)
@@ -2024,7 +2024,7 @@ static int hlua_socket_getsockname(struct lua_State *L)
 }
 
 /* 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,
index 7683150dce3653b06efefac70ea98d0931c080bd..2a927e0da8a6bc92dc58b8aeb7778b304c2b4731 100644 (file)
@@ -1055,7 +1055,7 @@ full:
        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,
index ad865ca749b02d7f9fbf3a091b6ca6658c72e779..28d65149f9186583e735e26b92566d7b2cabdc15 100644 (file)
@@ -372,7 +372,7 @@ static void stream_int_chk_snd(struct stream_interface *si)
  * 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;