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:
Willy Tarreau 2013-09-30 14:53:05 +02:00
parent cf644ed37a
commit 691b1f429e
3 changed files with 4 additions and 9 deletions

View File

@ -46,11 +46,6 @@ struct task *stream_int_register_handler(struct stream_interface *si,
struct si_applet *app);
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)
{
si->ops = &si_embedded_ops;
@ -148,10 +143,10 @@ static inline int si_connect(struct stream_interface *si)
{
int ret;
if (unlikely(!si_ctrl(si) || !si_ctrl(si)->connect))
if (unlikely(!si->conn->ctrl || !si->conn->ctrl->connect))
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)
return ret;

View File

@ -987,7 +987,7 @@ int connect_server(struct session *s)
else if (obj_type(s->target) == OBJ_TYPE_PROXY) {
/* 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);
if (!si_ctrl(s->req->cons))
if (!s->req->cons->conn->ctrl)
return SN_ERR_INTERNAL;
}
else

View File

@ -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->flags |= CF_READ_ATTACHED; /* producer is now attached */
if (si_ctrl(si)) {
if (si->conn->ctrl) {
/* real connections have timeouts */
req->wto = s->be->timeout.server;
rep->rto = s->be->timeout.server;