]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
REORG: check: Rename and export I/O callback function
authorChristopher Faulet <cfaulet@haproxy.com>
Wed, 18 May 2022 12:50:30 +0000 (14:50 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Thu, 19 May 2022 08:12:38 +0000 (10:12 +0200)
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
src/check.c

index 8a7c8dc64d3c44dd6a4bf9945029925a3f8a5f6e..f631c30fc3e97214f599fe3a99adcb422f884a6c 100644 (file)
@@ -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);
index 792c9aec6fb863ff0bbcf96ac8f796e38948faf7..f80c66e7476fd51e86454693b0a7052646423b9d 100644 (file)
@@ -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;
 }