BUG/MEDIUM: sink: Properly get the stream-int in appctx callback functions

The appctx owner is not a stream-interface anymore. It is now a
conn-stream. However, sink code was not updated accordingly. It is now
fixed.

It is 2.6-specific, no backport is needed.
This commit is contained in:
Christopher Faulet 2022-03-16 10:01:26 +01:00
parent fe14af30ec
commit 53fa787a07
1 changed files with 3 additions and 3 deletions

View File

@ -294,7 +294,7 @@ void sink_setup_proxy(struct proxy *px)
*/ */
static void sink_forward_io_handler(struct appctx *appctx) static void sink_forward_io_handler(struct appctx *appctx)
{ {
struct stream_interface *si = appctx->owner; struct stream_interface *si = cs_si(appctx->owner);
struct stream *s = si_strm(si); struct stream *s = si_strm(si);
struct sink *sink = strm_fe(s)->parent; struct sink *sink = strm_fe(s)->parent;
struct sink_forward_target *sft = appctx->ctx.sft.ptr; struct sink_forward_target *sft = appctx->ctx.sft.ptr;
@ -433,7 +433,7 @@ static void sink_forward_io_handler(struct appctx *appctx)
*/ */
static void sink_forward_oc_io_handler(struct appctx *appctx) static void sink_forward_oc_io_handler(struct appctx *appctx)
{ {
struct stream_interface *si = appctx->owner; struct stream_interface *si = cs_si(appctx->owner);
struct stream *s = si_strm(si); struct stream *s = si_strm(si);
struct sink *sink = strm_fe(s)->parent; struct sink *sink = strm_fe(s)->parent;
struct sink_forward_target *sft = appctx->ctx.sft.ptr; struct sink_forward_target *sft = appctx->ctx.sft.ptr;
@ -580,7 +580,7 @@ void __sink_forward_session_deinit(struct sink_forward_target *sft)
if (!sft->appctx) if (!sft->appctx)
return; return;
si = sft->appctx->owner; si = cs_si(sft->appctx->owner);
if (!si) if (!si)
return; return;