mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2026-01-15 05:41:16 +01:00
REORG/MINOR: checks: put a struct connection into the server
This will be used to handle the connection state once it goes away from fdtab. There is no functional change at the moment.
This commit is contained in:
parent
56e9c5e963
commit
da92e2fb61
@ -30,6 +30,7 @@
|
||||
#include <eb32tree.h>
|
||||
|
||||
#include <types/buffers.h>
|
||||
#include <types/connection.h>
|
||||
#include <types/counters.h>
|
||||
#include <types/freq_ctr.h>
|
||||
#include <types/port_range.h>
|
||||
@ -162,6 +163,7 @@ struct server {
|
||||
int puid; /* proxy-unique server ID, used for SNMP, and "first" LB algo */
|
||||
|
||||
char *check_data; /* storage of partial check results */
|
||||
struct connection *check_conn; /* connection state for health checks */
|
||||
int check_data_len; /* length of partial check results stored in check_data */
|
||||
|
||||
struct {
|
||||
|
||||
@ -4646,6 +4646,13 @@ stats_error_parsing:
|
||||
goto out;
|
||||
}
|
||||
|
||||
/* Allocate buffer for partial check results... */
|
||||
if ((newsrv->check_conn = calloc(1, sizeof(struct connection))) == NULL) {
|
||||
Alert("parsing [%s:%d] : out of memory while allocating check connection.\n", file, linenum);
|
||||
err_code |= ERR_ALERT | ERR_ABORT;
|
||||
goto out;
|
||||
}
|
||||
|
||||
newsrv->check_status = HCHK_STATUS_INI;
|
||||
newsrv->state |= SRV_CHECKED;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user