]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: muxes: export the timeout and shutr task handlers
authorWilly Tarreau <w@1wt.eu>
Fri, 29 Jan 2021 11:33:46 +0000 (12:33 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 29 Jan 2021 11:33:46 +0000 (12:33 +0100)
These ones appear often in "show tasks" so it's handy to make them
resolve.

src/mux_fcgi.c
src/mux_h1.c
src/mux_h2.c

index d45951b3e542e47f134a0353cc24f7e64a699803..3e1cff85208a5bf22e990663cbb829607dbaa7f0 100644 (file)
@@ -353,12 +353,12 @@ INITCALL1(STG_REGISTER, trace_register_source, TRACE_SOURCE);
 DECLARE_STATIC_POOL(pool_head_fcgi_conn, "fcgi_conn", sizeof(struct fcgi_conn));
 DECLARE_STATIC_POOL(pool_head_fcgi_strm, "fcgi_strm", sizeof(struct fcgi_strm));
 
-static struct task *fcgi_timeout_task(struct task *t, void *context, unsigned short state);
+struct task *fcgi_timeout_task(struct task *t, void *context, unsigned short state);
 static int fcgi_process(struct fcgi_conn *fconn);
 /* fcgi_io_cb is exported to see it resolved in "show fd" */
 struct task *fcgi_io_cb(struct task *t, void *ctx, unsigned short state);
 static inline struct fcgi_strm *fcgi_conn_st_by_id(struct fcgi_conn *fconn, int id);
-static struct task *fcgi_deferred_shut(struct task *t, void *ctx, unsigned short state);
+struct task *fcgi_deferred_shut(struct task *t, void *ctx, unsigned short state);
 static struct fcgi_strm *fcgi_conn_stream_new(struct fcgi_conn *fconn, struct conn_stream *cs, struct session *sess);
 static void fcgi_strm_notify_recv(struct fcgi_strm *fstrm);
 static void fcgi_strm_notify_send(struct fcgi_strm *fstrm);
@@ -3146,7 +3146,7 @@ static int fcgi_ctl(struct connection *conn, enum mux_ctl_type mux_ctl, void *ou
  * immediately killed. If it's allocatable and empty, we attempt to send a
  * ABORT records.
  */
-static struct task *fcgi_timeout_task(struct task *t, void *context, unsigned short state)
+struct task *fcgi_timeout_task(struct task *t, void *context, unsigned short state)
 {
        struct fcgi_conn *fconn = context;
        int expired = tick_is_expired(t->expire, now_ms);
@@ -3755,7 +3755,7 @@ static void fcgi_do_shutw(struct fcgi_strm *fstrm)
  * deferred shutdowns when the fcgi_detach() was done but the mux buffer was full
  * and prevented the last record from being emitted.
  */
-static struct task *fcgi_deferred_shut(struct task *t, void *ctx, unsigned short state)
+struct task *fcgi_deferred_shut(struct task *t, void *ctx, unsigned short state)
 {
        struct fcgi_strm *fstrm = ctx;
        struct fcgi_conn *fconn = fstrm->fconn;
index 5c826c6775b4eb13108b3f7fa2e1a82bb3cc4ba1..0a334278cd52070a958bc2cc1df823d4931eca32 100644 (file)
@@ -267,7 +267,7 @@ static int h1_send(struct h1c *h1c);
 static int h1_process(struct h1c *h1c);
 /* h1_io_cb is exported to see it resolved in "show fd" */
 struct task *h1_io_cb(struct task *t, void *ctx, unsigned short state);
-static struct task *h1_timeout_task(struct task *t, void *context, unsigned short state);
+struct task *h1_timeout_task(struct task *t, void *context, unsigned short state);
 static void h1_shutw_conn(struct connection *conn, enum cs_shw_mode mode);
 static void h1_wake_stream_for_recv(struct h1s *h1s);
 static void h1_wake_stream_for_send(struct h1s *h1s);
@@ -2871,7 +2871,7 @@ static int h1_wake(struct connection *conn)
 /* Connection timeout management. The principle is that if there's no receipt
  * nor sending for a certain amount of time, the connection is closed.
  */
-static struct task *h1_timeout_task(struct task *t, void *context, unsigned short state)
+struct task *h1_timeout_task(struct task *t, void *context, unsigned short state)
 {
        struct h1c *h1c = context;
        int expired = tick_is_expired(t->expire, now_ms);
index b067f29786e716f854d086343e132e97f83516aa..55c08f74bad85cb3aa7cbf7094a9d4b1ff41362a 100644 (file)
@@ -551,7 +551,7 @@ static const struct h2s *h2_idle_stream = &(const struct h2s){
        .id        = 0,
 };
 
-static struct task *h2_timeout_task(struct task *t, void *context, unsigned short state);
+struct task *h2_timeout_task(struct task *t, void *context, unsigned short state);
 static int h2_send(struct h2c *h2c);
 static int h2_recv(struct h2c *h2c);
 static int h2_process(struct h2c *h2c);
@@ -560,7 +560,7 @@ struct task *h2_io_cb(struct task *t, void *ctx, unsigned short state);
 static inline struct h2s *h2c_st_by_id(struct h2c *h2c, int id);
 static int h2c_decode_headers(struct h2c *h2c, struct buffer *rxbuf, uint32_t *flags, unsigned long long *body_len, char *upgrade_protocol);
 static int h2_frt_transfer_data(struct h2s *h2s);
-static struct task *h2_deferred_shut(struct task *t, void *ctx, unsigned short state);
+struct task *h2_deferred_shut(struct task *t, void *ctx, unsigned short state);
 static struct h2s *h2c_bck_stream_new(struct h2c *h2c, struct conn_stream *cs, struct session *sess);
 static void h2s_alert(struct h2s *h2s);
 
@@ -3956,7 +3956,7 @@ static int h2_wake(struct connection *conn)
  * immediately killed. If it's allocatable and empty, we attempt to send a
  * GOAWAY frame.
  */
-static struct task *h2_timeout_task(struct task *t, void *context, unsigned short state)
+struct task *h2_timeout_task(struct task *t, void *context, unsigned short state)
 {
        struct h2c *h2c = context;
        int expired = tick_is_expired(t->expire, now_ms);
@@ -4420,7 +4420,7 @@ static void h2_do_shutw(struct h2s *h2s)
  * deferred shutdowns when the h2_detach() was done but the mux buffer was full
  * and prevented the last frame from being emitted.
  */
-static struct task *h2_deferred_shut(struct task *t, void *ctx, unsigned short state)
+struct task *h2_deferred_shut(struct task *t, void *ctx, unsigned short state)
 {
        struct h2s *h2s = ctx;
        struct h2c *h2c = h2s->h2c;