From 361417f9b4971433d445fcbf7a5c4efe598f2df8 Mon Sep 17 00:00:00 2001 From: Christopher Faulet Date: Wed, 18 May 2022 14:50:30 +0200 Subject: [PATCH] REORG: check: Rename and export I/O callback function event_srv_chk_io() function is renamed srv_chk_io_cb() to be consistant with the I/O callback function of connections. In addition, this function is exported. It will be required to use the conn-stream's subscriptions. --- include/haproxy/check.h | 2 ++ src/check.c | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/include/haproxy/check.h b/include/haproxy/check.h index 8a7c8dc64..f631c30fc 100644 --- a/include/haproxy/check.h +++ b/include/haproxy/check.h @@ -74,6 +74,8 @@ void check_notify_stopping(struct check *check); void check_notify_success(struct check *check); struct task *process_chk(struct task *t, void *context, unsigned int state); +struct task *srv_chk_io_cb(struct task *t, void *ctx, unsigned int state); + int check_buf_available(void *target); struct buffer *check_get_buf(struct check *check, struct buffer *bptr); void check_release_buf(struct check *check, struct buffer *bptr); diff --git a/src/check.c b/src/check.c index 792c9aec6..f80c66e74 100644 --- a/src/check.c +++ b/src/check.c @@ -1068,7 +1068,7 @@ static int wake_srv_chk(struct conn_stream *cs) } /* This function checks if any I/O is wanted, and if so, attempts to do so */ -struct task *event_srv_chk_io(struct task *t, void *ctx, unsigned int state) +struct task *srv_chk_io_cb(struct task *t, void *ctx, unsigned int state) { struct check *check = ctx; struct conn_stream *cs = check->cs; @@ -1336,7 +1336,7 @@ const char *init_check(struct check *check, int type) if (!check->wait_list.tasklet) return "out of memory while allocating check tasklet"; check->wait_list.events = 0; - check->wait_list.tasklet->process = event_srv_chk_io; + check->wait_list.tasklet->process = srv_chk_io_cb; check->wait_list.tasklet->context = check; return NULL; }