mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-02-18 19:56:59 +00:00
MINOR: conn-stream: Rename cs_detach() to cs_detach_endp()
Because cs_detach() is releated to the endpoint only, the function is renamed. The main purpose of this patch is to be able to add a function to detach the conn-stream from the application.
This commit is contained in:
parent
108ce5a70b
commit
a73c9f0faa
@ -110,12 +110,13 @@ static inline void cs_attach_app(struct conn_stream *cs, enum obj_type *app, voi
|
||||
cs->data_cb = data_cb;
|
||||
}
|
||||
|
||||
/* Detach the conn_stream from the connection, if any. If a mux owns the
|
||||
* connection ->detach() callback is called. Otherwise, it means the conn-stream
|
||||
* owns the connection. In this case the connection is closed and released. The
|
||||
* conn-stream is not released.
|
||||
/* Detach the conn_stream from the endpoint, if any. For a connecrion, if a mux
|
||||
* owns the connection ->detach() callback is called. Otherwise, it means the
|
||||
* conn-stream owns the connection. In this case the connection is closed and
|
||||
* released. For an applet, the appctx is released. At the end, the conn-stream
|
||||
* is not released but some fields a reset.
|
||||
*/
|
||||
static inline void cs_detach(struct conn_stream *cs)
|
||||
static inline void cs_detach_endp(struct conn_stream *cs)
|
||||
{
|
||||
struct connection *conn;
|
||||
struct appctx *appctx;
|
||||
@ -150,7 +151,7 @@ static inline void cs_detach(struct conn_stream *cs)
|
||||
/* Release a conn_stream */
|
||||
static inline void cs_destroy(struct conn_stream *cs)
|
||||
{
|
||||
cs_detach(cs);
|
||||
cs_detach_endp(cs);
|
||||
cs_free(cs);
|
||||
}
|
||||
|
||||
|
@ -148,7 +148,7 @@ static inline void si_reset_endpoint(struct stream_interface *si)
|
||||
if (cs_conn_mux(si->cs) && si->wait_event.events != 0)
|
||||
(cs_conn_mux(si->cs))->unsubscribe(si->cs, si->wait_event.events, &si->wait_event);
|
||||
|
||||
cs_detach(si->cs);
|
||||
cs_detach_endp(si->cs);
|
||||
si->ops = &si_embedded_ops;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user