The SC created from a healthcheck is always a back SC. But SC_FL_ISBACK
flags was missing. Instead of passing it when sc_new_from_check() is called,
the function was simplified to set SC_FL_ISBACK flag systematically when a
SC is created from a healthcheck.
This patch should be backported as far as 2.6.
struct stconn *sc_new_from_endp(struct sedesc *sedesc, struct session *sess, struct buffer *input);
struct stconn *sc_new_from_strm(struct stream *strm, unsigned int flags);
-struct stconn *sc_new_from_check(struct check *check, unsigned int flags);
+struct stconn *sc_new_from_check(struct check *check);
void sc_free(struct stconn *sc);
int sc_attach_mux(struct stconn *sc, void *target, void *ctx);
check->current_step = NULL;
- check->sc = sc_new_from_check(check, SC_FL_NONE);
+ check->sc = sc_new_from_check(check);
if (!check->sc) {
set_server_check_status(check, HCHK_STATUS_SOCKERR, NULL);
goto end;
* thus it will be created by sc_new(). So the SE_FL_DETACHED flag is set. It
* returns NULL on error. On success, the new stream connector is returned.
*/
-struct stconn *sc_new_from_check(struct check *check, unsigned int flags)
+struct stconn *sc_new_from_check(struct check *check)
{
struct stconn *sc;
sc = sc_new(NULL);
if (unlikely(!sc))
return NULL;
- sc->flags |= flags;
+ sc->flags = SC_FL_ISBACK;
sc_ep_set(sc, SE_FL_DETACHED);
sc->app = &check->obj_type;
return sc;