diff --git a/include/haproxy/peers.h b/include/haproxy/peers.h index d100c0c24..3dfa8c902 100644 --- a/include/haproxy/peers.h +++ b/include/haproxy/peers.h @@ -40,10 +40,5 @@ int peers_register_table(struct peers *, struct stktable *table); void peers_setup_frontend(struct proxy *fe); void peers_register_keywords(struct peers_kw_list *pkwl); -static inline enum obj_type *peer_session_target(struct peer *p, struct stream *s) -{ - return &p->srv->obj_type; -} - #endif /* _HAPROXY_PEERS_H */ diff --git a/src/peers.c b/src/peers.c index e116e2fdd..efb2ac0a6 100644 --- a/src/peers.c +++ b/src/peers.c @@ -1080,7 +1080,7 @@ static int peer_session_init(struct appctx *appctx) s->scb->dst = addr; s->scb->flags |= (SC_FL_RCV_ONCE|SC_FL_NOLINGER); s->flags = SF_ASSIGNED; - s->target = peer_session_target(peer, s); + s->target = &peer->srv->obj_type; s->do_log = NULL; s->uniq_id = 0;