From d715d362008479eb41ebf08faf0aa97affdcd8af Mon Sep 17 00:00:00 2001 From: Christopher Faulet Date: Fri, 1 Apr 2022 16:38:32 +0200 Subject: [PATCH] MINOR: stream-int/conn-stream: Move stream_int_read0() in the conn-stream scope stream_int_read0() is renamed cs_conn_read0() and is updated to manipulate a conn-stream instead of a stream-interface. --- src/stream_interface.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/stream_interface.c b/src/stream_interface.c index da8955be6..f5b7b772e 100644 --- a/src/stream_interface.c +++ b/src/stream_interface.c @@ -42,7 +42,7 @@ DECLARE_POOL(pool_head_streaminterface, "stream_interface", sizeof(struct stream_interface)); /* last read notification */ -static void stream_int_read0(struct stream_interface *si); +static void cs_conn_read0(struct conn_stream *cs); /* post-IO notification callback */ static void stream_int_notify(struct stream_interface *si); @@ -284,7 +284,7 @@ int si_cs_process(struct conn_stream *cs) ic->flags |= CF_READ_NULL; if (ic->flags & CF_AUTO_CLOSE) channel_shutw_now(ic); - stream_int_read0(si); + cs_conn_read0(cs); } /* Report EOI on the channel if it was reached from the mux point of @@ -844,7 +844,7 @@ int si_cs_recv(struct conn_stream *cs) ic->flags |= CF_READ_NULL; if (ic->flags & CF_AUTO_CLOSE) channel_shutw_now(ic); - stream_int_read0(si); + cs_conn_read0(cs); ret = 1; } else if (!si_rx_blocked(si)) { @@ -863,15 +863,14 @@ int si_cs_recv(struct conn_stream *cs) * It updates the stream interface. If the stream interface has CS_FL_NOHALF, * the close is also forwarded to the write side as an abort. */ -static void stream_int_read0(struct stream_interface *si) +static void cs_conn_read0(struct conn_stream *cs) { - struct conn_stream *cs = si->cs; - struct channel *ic = si_ic(si); - struct channel *oc = si_oc(si); + struct channel *ic = cs_ic(cs); + struct channel *oc = cs_oc(cs); BUG_ON(!cs_conn(cs)); - si_rx_shut_blk(si); + si_rx_shut_blk(cs->si); if (ic->flags & CF_SHUTR) return; ic->flags |= CF_SHUTR; @@ -901,7 +900,7 @@ static void stream_int_read0(struct stream_interface *si) oc->flags |= CF_SHUTW; oc->wex = TICK_ETERNITY; - si_done_get(si); + si_done_get(cs->si); cs->state = CS_ST_DIS; __cs_strm(cs)->conn_exp = TICK_ETERNITY;