mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-11-28 22:31:06 +01:00
CLEANUP: stream-int: remove obsolete si_ctrl function
This function makes no sense anymore and will cause trouble to convert the remains of connection/applet to end points. Let's replace it now with its contents.
This commit is contained in:
parent
cf644ed37a
commit
691b1f429e
@ -46,11 +46,6 @@ struct task *stream_int_register_handler(struct stream_interface *si,
|
|||||||
struct si_applet *app);
|
struct si_applet *app);
|
||||||
void stream_int_unregister_handler(struct stream_interface *si);
|
void stream_int_unregister_handler(struct stream_interface *si);
|
||||||
|
|
||||||
static inline const struct protocol *si_ctrl(struct stream_interface *si)
|
|
||||||
{
|
|
||||||
return si->conn->ctrl;
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline void si_prepare_none(struct stream_interface *si)
|
static inline void si_prepare_none(struct stream_interface *si)
|
||||||
{
|
{
|
||||||
si->ops = &si_embedded_ops;
|
si->ops = &si_embedded_ops;
|
||||||
@ -148,10 +143,10 @@ static inline int si_connect(struct stream_interface *si)
|
|||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
if (unlikely(!si_ctrl(si) || !si_ctrl(si)->connect))
|
if (unlikely(!si->conn->ctrl || !si->conn->ctrl->connect))
|
||||||
return SN_ERR_INTERNAL;
|
return SN_ERR_INTERNAL;
|
||||||
|
|
||||||
ret = si_ctrl(si)->connect(si->conn, !channel_is_empty(si->ob), !!si->send_proxy_ofs);
|
ret = si->conn->ctrl->connect(si->conn, !channel_is_empty(si->ob), !!si->send_proxy_ofs);
|
||||||
if (ret != SN_ERR_NONE)
|
if (ret != SN_ERR_NONE)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
|
|||||||
@ -987,7 +987,7 @@ int connect_server(struct session *s)
|
|||||||
else if (obj_type(s->target) == OBJ_TYPE_PROXY) {
|
else if (obj_type(s->target) == OBJ_TYPE_PROXY) {
|
||||||
/* proxies exclusively run on raw_sock right now */
|
/* proxies exclusively run on raw_sock right now */
|
||||||
si_prepare_conn(s->req->cons, protocol_by_family(s->req->cons->conn->addr.to.ss_family), &raw_sock);
|
si_prepare_conn(s->req->cons, protocol_by_family(s->req->cons->conn->addr.to.ss_family), &raw_sock);
|
||||||
if (!si_ctrl(s->req->cons))
|
if (!s->req->cons->conn->ctrl)
|
||||||
return SN_ERR_INTERNAL;
|
return SN_ERR_INTERNAL;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@ -954,7 +954,7 @@ static void sess_establish(struct session *s, struct stream_interface *si)
|
|||||||
|
|
||||||
rep->analysers |= s->fe->fe_rsp_ana | s->be->be_rsp_ana;
|
rep->analysers |= s->fe->fe_rsp_ana | s->be->be_rsp_ana;
|
||||||
rep->flags |= CF_READ_ATTACHED; /* producer is now attached */
|
rep->flags |= CF_READ_ATTACHED; /* producer is now attached */
|
||||||
if (si_ctrl(si)) {
|
if (si->conn->ctrl) {
|
||||||
/* real connections have timeouts */
|
/* real connections have timeouts */
|
||||||
req->wto = s->be->timeout.server;
|
req->wto = s->be->timeout.server;
|
||||||
rep->rto = s->be->timeout.server;
|
rep->rto = s->be->timeout.server;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user