From: Christopher Faulet Date: Wed, 18 May 2022 12:50:30 +0000 (+0200) Subject: REORG: check: Rename and export I/O callback function X-Git-Tag: v2.6-dev11~48 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=361417f9b4971433d445fcbf7a5c4efe598f2df8;p=thirdparty%2Fhaproxy.git 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. --- diff --git a/include/haproxy/check.h b/include/haproxy/check.h index 8a7c8dc64d..f631c30fc3 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 792c9aec6f..f80c66e747 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; }