]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: session: export session_expire_embryonic()
authorWilly Tarreau <w@1wt.eu>
Fri, 29 Jan 2021 11:27:57 +0000 (12:27 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 29 Jan 2021 11:27:57 +0000 (12:27 +0100)
This is only to make it resolve nicely in "show tasks".

include/haproxy/session.h
src/session.c
src/tools.c

index 3b96f35a912792d9a5112f24164118e6eed2e8b4..f62ea50e7249e062b43b65a7c19cff2429519eb6 100644 (file)
@@ -37,6 +37,7 @@ struct session *session_new(struct proxy *fe, struct listener *li, enum obj_type
 void session_free(struct session *sess);
 int session_accept_fd(struct connection *cli_conn);
 int conn_complete_session(struct connection *conn);
+struct task *session_expire_embryonic(struct task *t, void *context, unsigned short state);
 
 /* Remove the refcount from the session to the tracked counters, and clear the
  * pointer to ensure this is only performed once. The caller is responsible for
index 07828df96791b512a43efb1fb68d96be0c12e39f..055b578c436851b4fa3200bbd7cdd38d5ff81152 100644 (file)
@@ -28,7 +28,6 @@ DECLARE_POOL(pool_head_sess_srv_list, "session server list",
                sizeof(struct sess_srv_list));
 
 int conn_complete_session(struct connection *conn);
-static struct task *session_expire_embryonic(struct task *t, void *context, unsigned short state);
 
 /* Create a a new session and assign it to frontend <fe>, listener <li>,
  * origin <origin>, set the current date and clear the stick counters pointers.
@@ -376,9 +375,10 @@ static void session_kill_embryonic(struct session *sess, unsigned short state)
 }
 
 /* Manages the embryonic session timeout. It is only called when the timeout
- * strikes and performs the required cleanup.
+ * strikes and performs the required cleanup. It's only exported to make it
+ * resolve in "show tasks".
  */
-static struct task *session_expire_embryonic(struct task *t, void *context, unsigned short state)
+struct task *session_expire_embryonic(struct task *t, void *context, unsigned short state)
 {
        struct session *sess = context;
 
index 8891d472de8a97273b8926be2a04e4b6964737ac..4ad6b95e09e609d87e62d27dcad53396f4e5d1e7 100644 (file)
@@ -4699,6 +4699,7 @@ const void *resolve_sym_name(struct buffer *buf, const char *pfx, const void *ad
                { .func = listener_accept, .name = "listener_accept" },
                { .func = poller_pipe_io_handler, .name = "poller_pipe_io_handler" },
                { .func = mworker_accept_wrapper, .name = "mworker_accept_wrapper" },
+               { .func = session_expire_embryonic, .name = "session_expire_embryonic" },
 #ifdef USE_THREAD
                { .func = accept_queue_process, .name = "accept_queue_process" },
 #endif