mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2026-03-14 19:41:33 +01:00
MINOR: check: Remove wake_srv_chk() function
wake_srv_chk() function is now only used by srv_chk_io_cb(), the health-checl I/O callback function. So let's remove it. The code of the function was moved in srv_chk_io_cb().
This commit is contained in:
parent
c2234aebc7
commit
c3dfca5ed6
@ -83,7 +83,6 @@ void check_release_buf(struct check *check, struct buffer *bptr);
|
||||
const char *init_check(struct check *check, int type);
|
||||
void free_check(struct check *check);
|
||||
void check_purge(struct check *check);
|
||||
int wake_srv_chk(struct stconn *sc);
|
||||
|
||||
int init_srv_check(struct server *srv);
|
||||
int init_srv_agent_check(struct server *srv);
|
||||
|
||||
18
src/check.c
18
src/check.c
@ -1045,13 +1045,12 @@ int httpchk_build_status_header(struct server *s, struct buffer *buf)
|
||||
/**************************************************************************/
|
||||
/***************** Health-checks based on connections *********************/
|
||||
/**************************************************************************/
|
||||
/* This function is used only for server health-checks. It handles connection
|
||||
* status updates including errors. If necessary, it wakes the check task up.
|
||||
* It returns 0 on normal cases, <0 if at least one close() has happened on the
|
||||
* connection (eg: reconnect). It relies on tcpcheck_main().
|
||||
/* This function handles connection status updates including errors. If
|
||||
* necessary, it wakes the check task up.
|
||||
*/
|
||||
int wake_srv_chk(struct stconn *sc)
|
||||
struct task *srv_chk_io_cb(struct task *t, void *ctx, unsigned int state)
|
||||
{
|
||||
struct stconn *sc = ctx;
|
||||
struct connection *conn;
|
||||
struct check *check = __sc_check(sc);
|
||||
int ret = 0;
|
||||
@ -1098,15 +1097,6 @@ int wake_srv_chk(struct stconn *sc)
|
||||
|
||||
end:
|
||||
TRACE_LEAVE(CHK_EV_HCHK_WAKE, check);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* This function checks if any I/O is wanted, and if so, attempts to do so */
|
||||
struct task *srv_chk_io_cb(struct task *t, void *ctx, unsigned int state)
|
||||
{
|
||||
struct stconn *sc = ctx;
|
||||
|
||||
wake_srv_chk(sc);
|
||||
return t;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user