static void sink_forward_io_handler(struct appctx *appctx)
{
struct stconn *sc = appctx_sc(appctx);
- struct stream *s = __sc_strm(sc);
- struct sink *sink = strm_fe(s)->parent;
struct sink_forward_target *sft = appctx->svcctx;
+ struct sink *sink = sft->sink;
struct ring *ring = sink->ctx.ring;
struct buffer *buf = &ring->buf;
uint64_t msg_len;
static void sink_forward_oc_io_handler(struct appctx *appctx)
{
struct stconn *sc = appctx_sc(appctx);
- struct stream *s = __sc_strm(sc);
- struct sink *sink = strm_fe(s)->parent;
struct sink_forward_target *sft = appctx->svcctx;
+ struct sink *sink = sft->sink;
struct ring *ring = sink->ctx.ring;
struct buffer *buf = &ring->buf;
uint64_t msg_len;
void __sink_forward_session_deinit(struct sink_forward_target *sft)
{
- struct stream *s = appctx_strm(sft->appctx);
struct sink *sink;
- sink = strm_fe(s)->parent;
+ sink = sft->sink;
if (!sink)
return;
/* link sink to proxy */
sink->forward_px = p;
- /* link proxy to sink */
- p->parent = sink;
-
return sink;
err: