static void promex_appctx_handle_io(struct appctx *appctx)
{
struct stconn *cs = appctx_cs(appctx);
- struct stream *s = __cs_strm(cs);
+ struct stream *s = __sc_strm(cs);
struct channel *req = sc_oc(cs);
struct channel *res = sc_ic(cs);
struct htx *req_htx, *res_htx;
}
/* returns the stream the appctx is attached to. Note that a stream *must*
- * be attached, as we use an unchecked dereference via __cs_strm().
+ * be attached, as we use an unchecked dereference via __sc_strm().
*/
static inline struct stream *appctx_strm(const struct appctx *appctx)
{
- return __cs_strm(appctx->sedesc->sc);
+ return __sc_strm(appctx->sedesc->sc);
}
/* writes chunk <chunk> into the input channel of the stream attached to this
}
/* Returns the stream from a cs if the application is a stream. Otherwise
- * NULL is returned. __cs_strm() returns the stream without any control
- * while cs_strm() check the application type.
+ * NULL is returned. __sc_strm() returns the stream without any control
+ * while sc_strm() check the application type.
*/
-static inline struct stream *__cs_strm(const struct stconn *cs)
+static inline struct stream *__sc_strm(const struct stconn *cs)
{
return __objt_stream(cs->app);
}
-static inline struct stream *cs_strm(const struct stconn *cs)
+static inline struct stream *sc_strm(const struct stconn *cs)
{
if (obj_type(cs->app) == OBJ_TYPE_STREAM)
- return __cs_strm(cs);
+ return __sc_strm(cs);
return NULL;
}
/* Returns the healthcheck from a cs if the application is a
- * healthcheck. Otherwise NULL is returned. __cs_check() returns the healthcheck
- * without any control while cs_check() check the application type.
+ * healthcheck. Otherwise NULL is returned. __sc_check() returns the healthcheck
+ * without any control while sc_check() check the application type.
*/
-static inline struct check *__cs_check(const struct stconn *cs)
+static inline struct check *__sc_check(const struct stconn *cs)
{
return __objt_check(cs->app);
}
-static inline struct check *cs_check(const struct stconn *cs)
+static inline struct check *sc_check(const struct stconn *cs)
{
if (obj_type(cs->app) == OBJ_TYPE_CHECK)
return __objt_check(cs->app);
/* returns the channel which receives data from this stream connector (input channel) */
static inline struct channel *sc_ic(struct stconn *cs)
{
- struct stream *strm = __cs_strm(cs);
+ struct stream *strm = __sc_strm(cs);
return ((cs->flags & SC_FL_ISBACK) ? &(strm->res) : &(strm->req));
}
/* returns the channel which feeds data to this stream connector (output channel) */
static inline struct channel *sc_oc(struct stconn *cs)
{
- struct stream *strm = __cs_strm(cs);
+ struct stream *strm = __sc_strm(cs);
return ((cs->flags & SC_FL_ISBACK) ? &(strm->req) : &(strm->res));
}
return &sc_oc(cs)->buf;
}
/* returns the stream's task associated to this stream connector */
-static inline struct task *cs_strm_task(struct stconn *cs)
+static inline struct task *sc_strm_task(struct stconn *cs)
{
- struct stream *strm = __cs_strm(cs);
+ struct stream *strm = __sc_strm(cs);
return strm->task;
}
/* returns the stream connector on the other side. Used during forwarding. */
static inline struct stconn *cs_opposite(struct stconn *cs)
{
- struct stream *strm = __cs_strm(cs);
+ struct stream *strm = __sc_strm(cs);
return ((cs->flags & SC_FL_ISBACK) ? strm->scf : strm->scb);
}
/* to be called only when in SC_ST_DIS with SC_FL_ERR */
static inline void cs_report_error(struct stconn *cs)
{
- if (!__cs_strm(cs)->conn_err_type)
- __cs_strm(cs)->conn_err_type = STRM_ET_DATA_ERR;
+ if (!__sc_strm(cs)->conn_err_type)
+ __sc_strm(cs)->conn_err_type = STRM_ET_DATA_ERR;
sc_oc(cs)->flags |= CF_WRITE_ERROR;
sc_ic(cs)->flags |= CF_READ_ERROR;
*/
static inline void cs_set_state(struct stconn *cs, int state)
{
- cs->state = __cs_strm(cs)->prev_conn_state = state;
+ cs->state = __sc_strm(cs)->prev_conn_state = state;
}
/* returns a bit for a stream connector state, to match against SC_SB_* */
if (cs->src)
return cs->src;
if (!(cs->flags & SC_FL_ISBACK))
- return sess_src(strm_sess(__cs_strm(cs)));
+ return sess_src(strm_sess(__sc_strm(cs)));
else {
struct connection *conn = cs_conn(cs);
if (cs->dst)
return cs->dst;
if (!(cs->flags & SC_FL_ISBACK))
- return sess_dst(strm_sess(__cs_strm(cs)));
+ return sess_dst(strm_sess(__sc_strm(cs)));
else {
struct connection *conn = cs_conn(cs);
return 1;
if (!(cs->flags & SC_FL_ISBACK))
- src = sess_src(strm_sess(__cs_strm(cs)));
+ src = sess_src(strm_sess(__sc_strm(cs)));
else {
struct connection *conn = cs_conn(cs);
return 1;
if (!(cs->flags & SC_FL_ISBACK))
- dst = sess_dst(strm_sess(__cs_strm(cs)));
+ dst = sess_dst(strm_sess(__sc_strm(cs)));
else {
struct connection *conn = cs_conn(cs);
/* Skip response body for HEAD requests or in case of "304 Not
* Modified" response. */
- if (__cs_strm(cs)->txn->meth == HTTP_METH_HEAD || ctx->send_notmodified)
+ if (__sc_strm(cs)->txn->meth == HTTP_METH_HEAD || ctx->send_notmodified)
appctx->st0 = HTX_CACHE_EOM;
else
appctx->st0 = HTX_CACHE_DATA;
int wake_srv_chk(struct stconn *cs)
{
struct connection *conn;
- struct check *check = __cs_check(cs);
+ struct check *check = __sc_check(cs);
struct email_alertq *q = container_of(check, typeof(*q), check);
int ret = 0;
struct stconn *cs = appctx_cs(appctx);
struct channel *req = sc_oc(cs);
struct channel *res = sc_ic(cs);
- struct bind_conf *bind_conf = strm_li(__cs_strm(cs))->bind_conf;
+ struct bind_conf *bind_conf = strm_li(__sc_strm(cs))->bind_conf;
int reql;
int len;
unsigned char *tmpbuf = NULL;
struct cmsghdr *cmsg;
struct stconn *cs = appctx_cs(appctx);
- struct stream *s = __cs_strm(cs);
+ struct stream *s = __sc_strm(cs);
struct connection *remote = cs_conn(cs_opposite(cs));
struct msghdr msghdr;
struct iovec iov;
se_fl_clr(sedesc, SE_FL_DETACHED);
if (!conn->ctx)
conn->ctx = cs;
- if (cs_strm(cs)) {
+ if (sc_strm(cs)) {
if (!cs->wait_event.tasklet) {
cs->wait_event.tasklet = tasklet_new();
if (!cs->wait_event.tasklet)
cs->app_ops = &sc_app_conn_ops;
}
- else if (cs_check(cs)) {
+ else if (sc_check(cs)) {
if (!cs->wait_event.tasklet) {
cs->wait_event.tasklet = tasklet_new();
if (!cs->wait_event.tasklet)
cs->sedesc->se = endp;
sc_ep_set(cs, SE_FL_T_APPLET);
sc_ep_clr(cs, SE_FL_DETACHED);
- if (cs_strm(cs))
+ if (sc_strm(cs))
cs->app_ops = &sc_app_applet_ops;
}
* connection related for now but this will evolved
*/
cs->flags &= SC_FL_ISBACK;
- if (cs_strm(cs))
+ if (sc_strm(cs))
cs->app_ops = &sc_app_embedded_ops;
else
cs->app_ops = NULL;
{
struct appctx *appctx;
- DPRINTF(stderr, "registering handler %p for cs %p (was %p)\n", app, cs, cs_strm_task(cs));
+ DPRINTF(stderr, "registering handler %p for cs %p (was %p)\n", app, cs, sc_strm_task(cs));
appctx = appctx_new_here(app, cs->sedesc);
if (!appctx)
return NULL;
cs_attach_applet(cs, appctx);
- appctx->t->nice = __cs_strm(cs)->task->nice;
+ appctx->t->nice = __sc_strm(cs)->task->nice;
cs_cant_get(cs);
appctx_wakeup(appctx);
if (sc_oc(cs)->flags & CF_SHUTW) {
cs->state = SC_ST_DIS;
- __cs_strm(cs)->conn_exp = TICK_ETERNITY;
+ __sc_strm(cs)->conn_exp = TICK_ETERNITY;
}
else if (cs->flags & SC_FL_NOHALF) {
/* we want to immediately forward this close to the write side */
/* note that if the task exists, it must unregister itself once it runs */
if (!(cs->flags & SC_FL_DONT_WAKE))
- task_wakeup(cs_strm_task(cs), TASK_WOKEN_IO);
+ task_wakeup(sc_strm_task(cs), TASK_WOKEN_IO);
}
/*
cs_rx_shut_blk(cs);
ic->flags |= CF_SHUTR;
ic->rex = TICK_ETERNITY;
- __cs_strm(cs)->conn_exp = TICK_ETERNITY;
+ __sc_strm(cs)->conn_exp = TICK_ETERNITY;
}
/* note that if the task exists, it must unregister itself once it runs */
if (!(cs->flags & SC_FL_DONT_WAKE))
- task_wakeup(cs_strm_task(cs), TASK_WOKEN_IO);
+ task_wakeup(sc_strm_task(cs), TASK_WOKEN_IO);
}
/* default chk_rcv function for scheduled tasks */
else {
/* (re)start reading */
if (!(cs->flags & SC_FL_DONT_WAKE))
- task_wakeup(cs_strm_task(cs), TASK_WOKEN_IO);
+ task_wakeup(sc_strm_task(cs), TASK_WOKEN_IO);
}
}
oc->wex = tick_add_ifset(now_ms, oc->wto);
if (!(cs->flags & SC_FL_DONT_WAKE))
- task_wakeup(cs_strm_task(cs), TASK_WOKEN_IO);
+ task_wakeup(sc_strm_task(cs), TASK_WOKEN_IO);
}
/*
if (sc_oc(cs)->flags & CF_SHUTW) {
cs_conn_shut(cs);
cs->state = SC_ST_DIS;
- __cs_strm(cs)->conn_exp = TICK_ETERNITY;
+ __sc_strm(cs)->conn_exp = TICK_ETERNITY;
}
else if (cs->flags & SC_FL_NOHALF) {
/* we want to immediately forward this close to the write side */
cs_rx_shut_blk(cs);
ic->flags |= CF_SHUTR;
ic->rex = TICK_ETERNITY;
- __cs_strm(cs)->conn_exp = TICK_ETERNITY;
+ __sc_strm(cs)->conn_exp = TICK_ETERNITY;
}
}
!cs_state_in(cs->state, SC_SB_EST))))) {
out_wakeup:
if (!(cs->flags & SC_FL_DONT_WAKE))
- task_wakeup(cs_strm_task(cs), TASK_WOKEN_IO);
+ task_wakeup(sc_strm_task(cs), TASK_WOKEN_IO);
}
}
if (sc_oc(cs)->flags & CF_SHUTW) {
appctx_shut(__cs_appctx(cs));
cs->state = SC_ST_DIS;
- __cs_strm(cs)->conn_exp = TICK_ETERNITY;
+ __sc_strm(cs)->conn_exp = TICK_ETERNITY;
}
else if (cs->flags & SC_FL_NOHALF) {
/* we want to immediately forward this close to the write side */
cs_rx_shut_blk(cs);
ic->flags |= CF_SHUTR;
ic->rex = TICK_ETERNITY;
- __cs_strm(cs)->conn_exp = TICK_ETERNITY;
+ __sc_strm(cs)->conn_exp = TICK_ETERNITY;
}
}
struct channel *ic = sc_ic(cs);
struct channel *oc = sc_oc(cs);
struct stconn *cso = cs_opposite(cs);
- struct task *task = cs_strm_task(cs);
+ struct task *task = sc_strm_task(cs);
/* process consumer side */
if (channel_is_empty(oc)) {
task->expire = tick_first(task->expire, ic->analyse_exp);
task->expire = tick_first(task->expire, oc->analyse_exp);
- task->expire = tick_first(task->expire, __cs_strm(cs)->conn_exp);
+ task->expire = tick_first(task->expire, __sc_strm(cs)->conn_exp);
task_queue(task);
}
cs_done_get(cs);
cs->state = SC_ST_DIS;
- __cs_strm(cs)->conn_exp = TICK_ETERNITY;
+ __sc_strm(cs)->conn_exp = TICK_ETERNITY;
return;
}
}
/* now we'll need a input buffer for the stream */
- if (!cs_alloc_ibuf(cs, &(__cs_strm(cs)->buffer_wait)))
+ if (!cs_alloc_ibuf(cs, &(__sc_strm(cs)->buffer_wait)))
goto end_recv;
/* For an HTX stream, if the buffer is stuck (no output data with some
* NOTE: A possible optim may be to let the mux decides if defrag is
* required or not, depending on amount of data to be xferred.
*/
- if (IS_HTX_STRM(__cs_strm(cs)) && !co_data(ic)) {
+ if (IS_HTX_STRM(__sc_strm(cs)) && !co_data(ic)) {
struct htx *htx = htxbuf(&ic->buf);
if (htx_is_not_empty(htx) && ((htx->flags & HTX_FL_FRAGMENTED) || htx_space_wraps(htx)))
}
/* Instruct the mux it must subscribed for read events */
- flags |= ((!conn_is_back(conn) && (__cs_strm(cs)->be->options & PR_O_ABRT_CLOSE)) ? CO_RFL_KEEP_RECV : 0);
+ flags |= ((!conn_is_back(conn) && (__sc_strm(cs)->be->options & PR_O_ABRT_CLOSE)) ? CO_RFL_KEEP_RECV : 0);
/* Important note : if we're called with POLL_IN|POLL_HUP, it means the read polling
* was enabled, which implies that the recv buffer was not full. So we have a guarantee
static int cs_conn_send(struct stconn *cs)
{
struct connection *conn = __cs_conn(cs);
- struct stream *s = __cs_strm(cs);
+ struct stream *s = __sc_strm(cs);
struct channel *oc = sc_oc(cs);
int ret;
int did_send = 0;
if (!(conn->flags & (CO_FL_WAIT_XPRT | CO_FL_EARLY_SSL_HS)) &&
sc_ep_test(cs, SE_FL_WAIT_FOR_HS)) {
sc_ep_clr(cs, SE_FL_WAIT_FOR_HS);
- task_wakeup(cs_strm_task(cs), TASK_WOKEN_MSG);
+ task_wakeup(sc_strm_task(cs), TASK_WOKEN_MSG);
}
if (!cs_state_in(cs->state, SC_SB_EST|SC_SB_DIS|SC_SB_CLO) &&
(conn->flags & CO_FL_WAIT_XPRT) == 0) {
- __cs_strm(cs)->conn_exp = TICK_ETERNITY;
+ __sc_strm(cs)->conn_exp = TICK_ETERNITY;
oc->flags |= CF_WRITE_NULL;
if (cs->state == SC_ST_CON)
cs->state = SC_ST_RDY;
* stream connector status.
*/
cs_notify(cs);
- stream_release_buffers(__cs_strm(cs));
+ stream_release_buffers(__sc_strm(cs));
return 0;
}
if (ret != 0)
cs_conn_process(cs);
- stream_release_buffers(__cs_strm(cs));
+ stream_release_buffers(__sc_strm(cs));
return t;
}
/* update the stream connector, channels, and possibly wake the stream up */
cs_notify(cs);
- stream_release_buffers(__cs_strm(cs));
+ stream_release_buffers(__sc_strm(cs));
/* cs_notify may have passed through chk_snd and released some
* RXBLK flags. Process_stream will consider those flags to wake up the
* send a LOCAL line (eg: for use with health checks).
*/
- if (cs && cs_strm(cs)) {
+ if (cs && sc_strm(cs)) {
ret = make_proxy_line(trash.area, trash.size,
objt_server(conn->target),
cs_conn(cs_opposite(cs)),
- __cs_strm(cs));
+ __sc_strm(cs));
}
else {
/* The target server expects a LOCAL line to be sent first. Retrieving
if (task->process == process_stream && task->context)
s = (struct stream *)task->context;
else if (task->process == task_run_applet && task->context)
- s = cs_strm(appctx_cs((struct appctx *)task->context));
+ s = sc_strm(appctx_cs((struct appctx *)task->context));
else if (task->process == cs_conn_io_cb && task->context)
- s = cs_strm(((struct stconn *)task->context));
+ s = sc_strm(((struct stconn *)task->context));
if (s)
stream_dump(buf, s, pfx, '\n');
if (!cs_state_in(cs->state, SC_SB_RDY|SC_SB_EST)) {
/* not connected yet */
cs_rx_endp_more(cs);
- task_wakeup(__cs_strm(cs)->task, TASK_WOKEN_MSG);
+ task_wakeup(__sc_strm(cs)->task, TASK_WOKEN_MSG);
goto stop;
}
spoe_handle_processing_appctx(struct appctx *appctx)
{
struct stconn *cs = appctx_cs(appctx);
- struct server *srv = objt_server(__cs_strm(cs)->target);
+ struct server *srv = objt_server(__sc_strm(cs)->target);
struct spoe_agent *agent = SPOE_APPCTX(appctx)->agent;
int ret, skip_sending = 0, skip_receiving = 0, active_s = 0, active_r = 0, close_asap = 0;
sc_ic(cs)->flags |= CF_READ_NULL;
notification_wake(&ctx->wake_on_read);
notification_wake(&ctx->wake_on_write);
- stream_shutdown(__cs_strm(cs), SF_ERR_KILLED);
+ stream_shutdown(__sc_strm(cs), SF_ERR_KILLED);
}
/* If we can't write, wakeup the pending write signals. */
csk_ctx = container_of(peer, struct hlua_csk_ctx, xref);
appctx = csk_ctx->appctx;
cs = appctx_cs(appctx);
- s = __cs_strm(cs);
+ s = __sc_strm(cs);
/* Check for connection close. */
if (channel_output_closed(&s->req)) {
csk_ctx = container_of(peer, struct hlua_csk_ctx, xref);
appctx = csk_ctx->appctx;
cs = appctx_cs(appctx);
- s = __cs_strm(cs);
+ s = __sc_strm(cs);
if (!sockaddr_alloc(&cs_opposite(cs)->dst, addr, sizeof(*addr))) {
xref_unlock(&socket->xref, peer);
{
struct hlua_tcp_ctx *tcp_ctx = applet_reserve_svcctx(ctx, sizeof(*tcp_ctx));
struct stconn *cs = appctx_cs(ctx);
- struct stream *strm = __cs_strm(cs);
+ struct stream *strm = __sc_strm(cs);
struct hlua *hlua;
struct task *task;
char **arg;
{
struct hlua_tcp_ctx *tcp_ctx = ctx->svcctx;
struct stconn *cs = appctx_cs(ctx);
- struct stream *strm = __cs_strm(cs);
+ struct stream *strm = __sc_strm(cs);
struct channel *res = sc_ic(cs);
struct act_rule *rule = ctx->rule;
struct proxy *px = strm->be;
{
struct hlua_http_ctx *http_ctx = applet_reserve_svcctx(ctx, sizeof(*http_ctx));
struct stconn *cs = appctx_cs(ctx);
- struct stream *strm = __cs_strm(cs);
+ struct stream *strm = __sc_strm(cs);
struct http_txn *txn;
struct hlua *hlua;
char **arg;
{
struct hlua_http_ctx *http_ctx = ctx->svcctx;
struct stconn *cs = appctx_cs(ctx);
- struct stream *strm = __cs_strm(cs);
+ struct stream *strm = __sc_strm(cs);
struct channel *req = sc_oc(cs);
struct channel *res = sc_ic(cs);
struct act_rule *rule = ctx->rule;
{
struct httpclient *hc = appctx->svcctx;
struct stconn *cs = appctx_cs(appctx);
- struct stream *s = __cs_strm(cs);
+ struct stream *s = __sc_strm(cs);
struct channel *req = &s->req;
struct channel *res = &s->res;
struct htx_blk *blk = NULL;
{
static THREAD_LOCAL struct ist metadata[LOG_META_FIELDS];
struct stconn *cs = appctx_cs(appctx);
- struct stream *s = __cs_strm(cs);
+ struct stream *s = __sc_strm(cs);
struct proxy *frontend = strm_fe(s);
struct listener *l = strm_li(s);
struct buffer *buf = get_trash_chunk();
struct fcgi_strm_params *params)
{
struct connection *cli_conn = objt_conn(fstrm->sess->origin);
- const struct sockaddr_storage *src = (cs_check(fcgi_strm_sc(fstrm)) ? conn_src(fconn->conn) : cs_src(cs_opposite(fcgi_strm_sc(fstrm))));
- const struct sockaddr_storage *dst = (cs_check(fcgi_strm_sc(fstrm)) ? conn_dst(fconn->conn) : cs_dst(cs_opposite(fcgi_strm_sc(fstrm))));
+ const struct sockaddr_storage *src = (sc_check(fcgi_strm_sc(fstrm)) ? conn_src(fconn->conn) : cs_src(cs_opposite(fcgi_strm_sc(fstrm))));
+ const struct sockaddr_storage *dst = (sc_check(fcgi_strm_sc(fstrm)) ? conn_dst(fconn->conn) : cs_dst(cs_opposite(fcgi_strm_sc(fstrm))));
struct ist p;
if (!sl)
struct proxy *other_end;
union error_snapshot_ctx ctx;
- if (fcgi_strm_sc(fstrm) && cs_strm(fcgi_strm_sc(fstrm))) {
+ if (fcgi_strm_sc(fstrm) && sc_strm(fcgi_strm_sc(fstrm))) {
if (sess == NULL)
- sess = __cs_strm(fcgi_strm_sc(fstrm))->sess;
+ sess = __sc_strm(fcgi_strm_sc(fstrm))->sess;
if (!(h1m->flags & H1_MF_RESP))
- other_end = __cs_strm(fcgi_strm_sc(fstrm))->be;
+ other_end = __sc_strm(fcgi_strm_sc(fstrm))->be;
else
other_end = sess->fe;
} else
struct proxy *other_end;
union error_snapshot_ctx ctx;
- if ((h1c->flags & H1C_F_ST_ATTACHED) && cs_strm(h1s_sc(h1s))) {
+ if ((h1c->flags & H1C_F_ST_ATTACHED) && sc_strm(h1s_sc(h1s))) {
if (sess == NULL)
- sess = __cs_strm(h1s_sc(h1s))->sess;
+ sess = __sc_strm(h1s_sc(h1s))->sess;
if (!(h1m->flags & H1_MF_RESP))
- other_end = __cs_strm(h1s_sc(h1s))->be;
+ other_end = __sc_strm(h1s_sc(h1s))->be;
else
other_end = sess->fe;
} else
static void peer_io_handler(struct appctx *appctx)
{
struct stconn *cs = appctx_cs(appctx);
- struct stream *s = __cs_strm(cs);
+ struct stream *s = __sc_strm(cs);
struct peers *curpeers = strm_fe(s)->parent;
struct peer *curpeer = NULL;
int reql = 0;
appctx->t ? appctx->t->calls : 0);
peer_cs = appctx_cs(peer->appctx);
- peer_s = __cs_strm(peer_cs);
+ peer_s = __sc_strm(peer_cs);
chunk_appendf(&trash, " state=%s", cs_state_str(cs_opposite(peer_cs)->state));
static void sink_forward_io_handler(struct appctx *appctx)
{
struct stconn *cs = appctx_cs(appctx);
- struct stream *s = __cs_strm(cs);
+ struct stream *s = __sc_strm(cs);
struct sink *sink = strm_fe(s)->parent;
struct sink_forward_target *sft = appctx->svcctx;
struct ring *ring = sink->ctx.ring;
static void sink_forward_oc_io_handler(struct appctx *appctx)
{
struct stconn *cs = appctx_cs(appctx);
- struct stream *s = __cs_strm(cs);
+ struct stream *s = __sc_strm(cs);
struct sink *sink = strm_fe(s)->parent;
struct sink_forward_target *sft = appctx->svcctx;
struct ring *ring = sink->ctx.ring;
{
struct appctx *appctx = __cs_appctx(cs);
struct show_stat_ctx *ctx = appctx->svcctx;
- struct stream *s = __cs_strm(cs);
+ struct stream *s = __sc_strm(cs);
struct channel *rep = sc_ic(cs);
struct server *sv, *svs; /* server and server-state, server-state=server or server->track */
struct listener *l;
*/
static int stats_process_http_post(struct stconn *cs)
{
- struct stream *s = __cs_strm(cs);
+ struct stream *s = __sc_strm(cs);
struct appctx *appctx = __cs_appctx(cs);
struct show_stat_ctx *ctx = appctx->svcctx;
static int stats_send_http_headers(struct stconn *cs, struct htx *htx)
{
- struct stream *s = __cs_strm(cs);
+ struct stream *s = __sc_strm(cs);
struct uri_auth *uri = s->be->uri_auth;
struct appctx *appctx = __cs_appctx(cs);
struct show_stat_ctx *ctx = appctx->svcctx;
static int stats_send_http_redirect(struct stconn *cs, struct htx *htx)
{
char scope_txt[STAT_SCOPE_TXT_MAXLEN + sizeof STAT_SCOPE_PATTERN];
- struct stream *s = __cs_strm(cs);
+ struct stream *s = __sc_strm(cs);
struct uri_auth *uri = s->be->uri_auth;
struct appctx *appctx = __cs_appctx(cs);
struct show_stat_ctx *ctx = appctx->svcctx;
{
struct show_stat_ctx *ctx = appctx->svcctx;
struct stconn *cs = appctx_cs(appctx);
- struct stream *s = __cs_strm(cs);
+ struct stream *s = __sc_strm(cs);
struct channel *req = sc_oc(cs);
struct channel *res = sc_ic(cs);
struct htx *req_htx, *res_htx;
struct appctx *appctx,
struct stktable *t, struct stktable *target)
{
- struct stream *s = __cs_strm(appctx_cs(appctx));
+ struct stream *s = __sc_strm(appctx_cs(appctx));
chunk_appendf(msg, "# table: %s, type: %s, size:%d, used:%d\n",
t->id, stktable_types[t->type].kw, t->size, t->current);
{
struct show_table_ctx *ctx = appctx->svcctx;
struct stconn *cs = appctx_cs(appctx);
- struct stream *s = __cs_strm(cs);
+ struct stream *s = __sc_strm(cs);
struct ebmb_node *eb;
int skip_entry;
int show = ctx->action == STK_CLI_ACT_SHOW;
*/
int stream_upgrade_from_cs(struct stconn *cs, struct buffer *input)
{
- struct stream *s = __cs_strm(cs);
+ struct stream *s = __sc_strm(cs);
const struct mux_ops *mux = cs_conn_mux(cs);
if (mux) {