From: Willy Tarreau Date: Mon, 14 Oct 2013 15:29:15 +0000 (+0200) Subject: MINOR: checks: call conn_init() to properly initialize the connection. X-Git-Tag: v1.5-dev20~108 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4bdae8aa82c18a9b8773e1b4448f4156470f687b;p=thirdparty%2Fhaproxy.git MINOR: checks: call conn_init() to properly initialize the connection. This ensures we don't forget to set some fields such as obj_type. --- diff --git a/src/checks.c b/src/checks.c index 51e2fe44a9..d781b4c003 100644 --- a/src/checks.c +++ b/src/checks.c @@ -1540,10 +1540,9 @@ static struct task *process_chk(struct task *t) } /* prepare a new connection */ - conn->flags = CO_FL_NONE; - conn->err_code = CO_ER_NONE; - conn->target = &s->obj_type; + conn_init(conn); conn_prepare(conn, &check_conn_cb, s->check_common.proto, s->check_common.xprt, check); + conn->target = &s->obj_type; /* no client address */ clear_addr(&conn->addr.from);