CLEANUP: applet: rename appctx_cs() to appctx_sc()
It returns a stream connector, not a conn_stream anymore, so let's
fix its name.
diff --git a/src/activity.c b/src/activity.c
index 4d55f91..10ee65d 100644
--- a/src/activity.c
+++ b/src/activity.c
@@ -621,7 +621,7 @@
unsigned long long tot_alloc_calls, tot_free_calls;
unsigned long long tot_alloc_bytes, tot_free_bytes;
#endif
- struct stconn *sc = appctx_cs(appctx);
+ struct stconn *sc = appctx_sc(appctx);
struct buffer *name_buffer = get_trash_chunk();
const char *str;
int max_lines;
@@ -840,7 +840,7 @@
static int cli_io_handler_show_tasks(struct appctx *appctx)
{
struct sched_activity tmp_activity[256] __attribute__((aligned(64)));
- struct stconn *sc = appctx_cs(appctx);
+ struct stconn *sc = appctx_sc(appctx);
struct buffer *name_buffer = get_trash_chunk();
struct sched_activity *entry;
const struct tasklet *tl;
diff --git a/src/applet.c b/src/applet.c
index 7ec026e..2b015a0 100644
--- a/src/applet.c
+++ b/src/applet.c
@@ -114,7 +114,7 @@
/* If a frontend appctx is attached to a stream connector, release the stream
* instead of the appctx.
*/
- if (!se_fl_test(appctx->sedesc, SE_FL_ORPHAN) && !(appctx_cs(appctx)->flags & SC_FL_ISBACK)) {
+ if (!se_fl_test(appctx->sedesc, SE_FL_ORPHAN) && !(appctx_sc(appctx)->flags & SC_FL_ISBACK)) {
stream_free(appctx_strm(appctx));
return;
}
@@ -164,7 +164,7 @@
int appctx_buf_available(void *arg)
{
struct appctx *appctx = arg;
- struct stconn *sc = appctx_cs(appctx);
+ struct stconn *sc = appctx_sc(appctx);
/* allocation requested ? */
if (!(sc->flags & SC_FL_NEED_BUFF))
@@ -209,10 +209,10 @@
appctx_free_on_early_error(app);
return NULL;
}
- BUG_ON(!app->sess || !appctx_cs(app) || !appctx_strm(app));
+ BUG_ON(!app->sess || !appctx_sc(app) || !appctx_strm(app));
}
- sc = appctx_cs(app);
+ sc = appctx_sc(app);
/* We always pretend the applet can't get and doesn't want to
* put, it's up to it to change this if needed. This ensures
diff --git a/src/cache.c b/src/cache.c
index 98c2ece..604d98d 100644
--- a/src/cache.c
+++ b/src/cache.c
@@ -1294,7 +1294,7 @@
uint32_t blksz;
max = htx_get_max_blksz(htx,
- channel_htx_recv_max(sc_ic(appctx_cs(appctx)), htx));
+ channel_htx_recv_max(sc_ic(appctx_sc(appctx)), htx));
if (!max)
return 0;
blksz = ((type == HTX_BLK_HDR || type == HTX_BLK_TLR)
@@ -1338,7 +1338,7 @@
uint32_t blksz;
max = htx_get_max_blksz(htx,
- channel_htx_recv_max(sc_ic(appctx_cs(appctx)), htx));
+ channel_htx_recv_max(sc_ic(appctx_sc(appctx)), htx));
if (!max)
return 0;
@@ -1455,7 +1455,7 @@
struct cache_appctx *ctx = appctx->svcctx;
struct cache_entry *cache_ptr = ctx->entry;
struct shared_block *first = block_ptr(cache_ptr);
- struct stconn *sc = appctx_cs(appctx);
+ struct stconn *sc = appctx_sc(appctx);
struct channel *req = sc_oc(sc);
struct channel *res = sc_ic(sc);
struct htx *req_htx, *res_htx;
diff --git a/src/cli.c b/src/cli.c
index 242ad7a..5cb34cb 100644
--- a/src/cli.c
+++ b/src/cli.c
@@ -897,7 +897,7 @@
*/
static void cli_io_handler(struct appctx *appctx)
{
- struct stconn *sc = appctx_cs(appctx);
+ struct stconn *sc = appctx_sc(appctx);
struct channel *req = sc_oc(sc);
struct channel *res = sc_ic(sc);
struct bind_conf *bind_conf = strm_li(__sc_strm(sc))->bind_conf;
@@ -1224,7 +1224,7 @@
static int cli_io_handler_show_env(struct appctx *appctx)
{
struct show_env_ctx *ctx = appctx->svcctx;
- struct stconn *sc = appctx_cs(appctx);
+ struct stconn *sc = appctx_sc(appctx);
char **var = ctx->var;
if (unlikely(sc_ic(sc)->flags & (CF_WRITE_ERROR|CF_SHUTW)))
@@ -1259,7 +1259,7 @@
*/
static int cli_io_handler_show_fd(struct appctx *appctx)
{
- struct stconn *sc = appctx_cs(appctx);
+ struct stconn *sc = appctx_sc(appctx);
struct show_fd_ctx *fdctx = appctx->svcctx;
int fd = fdctx->fd;
int ret = 1;
@@ -1458,7 +1458,7 @@
*/
static int cli_io_handler_show_activity(struct appctx *appctx)
{
- struct stconn *sc = appctx_cs(appctx);
+ struct stconn *sc = appctx_sc(appctx);
int thr;
if (unlikely(sc_ic(sc)->flags & (CF_WRITE_ERROR|CF_SHUTW)))
@@ -1969,7 +1969,7 @@
char *cmsgbuf = NULL;
unsigned char *tmpbuf = NULL;
struct cmsghdr *cmsg;
- struct stconn *sc = appctx_cs(appctx);
+ struct stconn *sc = appctx_sc(appctx);
struct stream *s = __sc_strm(sc);
struct connection *remote = sc_conn(sc_opposite(sc));
struct msghdr msghdr;
diff --git a/src/debug.c b/src/debug.c
index 72b6720..9a5c294 100644
--- a/src/debug.c
+++ b/src/debug.c
@@ -251,7 +251,7 @@
if (task->process == process_stream && task->context)
s = (struct stream *)task->context;
else if (task->process == task_run_applet && task->context)
- s = sc_strm(appctx_cs((struct appctx *)task->context));
+ s = sc_strm(appctx_sc((struct appctx *)task->context));
else if (task->process == sc_conn_io_cb && task->context)
s = sc_strm(((struct stconn *)task->context));
@@ -290,7 +290,7 @@
*/
static int cli_io_handler_show_threads(struct appctx *appctx)
{
- struct stconn *sc = appctx_cs(appctx);
+ struct stconn *sc = appctx_sc(appctx);
int thr;
if (unlikely(sc_ic(sc)->flags & (CF_WRITE_ERROR|CF_SHUTW)))
@@ -1043,7 +1043,7 @@
static int debug_iohandler_fd(struct appctx *appctx)
{
struct dev_fd_ctx *ctx = appctx->svcctx;
- struct stconn *sc = appctx_cs(appctx);
+ struct stconn *sc = appctx_sc(appctx);
struct sockaddr_storage sa;
struct stat statbuf;
socklen_t salen, vlen;
@@ -1237,7 +1237,7 @@
static int debug_iohandler_memstats(struct appctx *appctx)
{
struct dev_mem_ctx *ctx = appctx->svcctx;
- struct stconn *sc = appctx_cs(appctx);
+ struct stconn *sc = appctx_sc(appctx);
struct mem_stats *ptr = ctx->start;
int ret = 1;
diff --git a/src/dns.c b/src/dns.c
index 1a283bf..710cd5c 100644
--- a/src/dns.c
+++ b/src/dns.c
@@ -438,7 +438,7 @@
*/
static void dns_session_io_handler(struct appctx *appctx)
{
- struct stconn *sc = appctx_cs(appctx);
+ struct stconn *sc = appctx_sc(appctx);
struct dns_session *ds = appctx->svcctx;
struct ring *ring = &ds->ring;
struct buffer *buf = &ring->buf;
diff --git a/src/flt_spoe.c b/src/flt_spoe.c
index 9c92451..9973123 100644
--- a/src/flt_spoe.c
+++ b/src/flt_spoe.c
@@ -1137,7 +1137,7 @@
static int
spoe_send_frame(struct appctx *appctx, char *buf, size_t framesz)
{
- struct stconn *sc = appctx_cs(appctx);
+ struct stconn *sc = appctx_sc(appctx);
int ret;
uint32_t netint;
@@ -1164,7 +1164,7 @@
static int
spoe_recv_frame(struct appctx *appctx, char *buf, size_t framesz)
{
- struct stconn *sc = appctx_cs(appctx);
+ struct stconn *sc = appctx_sc(appctx);
int ret;
uint32_t netint;
@@ -1266,7 +1266,7 @@
static void
spoe_release_appctx(struct appctx *appctx)
{
- struct stconn *sc = appctx_cs(appctx);
+ struct stconn *sc = appctx_sc(appctx);
struct spoe_appctx *spoe_appctx = SPOE_APPCTX(appctx);
struct spoe_agent *agent;
struct spoe_context *ctx, *back;
@@ -1386,7 +1386,7 @@
static int
spoe_handle_connect_appctx(struct appctx *appctx)
{
- struct stconn *sc = appctx_cs(appctx);
+ struct stconn *sc = appctx_sc(appctx);
struct spoe_agent *agent = SPOE_APPCTX(appctx)->agent;
char *frame, *buf;
int ret;
@@ -1452,7 +1452,7 @@
static int
spoe_handle_connecting_appctx(struct appctx *appctx)
{
- struct stconn *sc = appctx_cs(appctx);
+ struct stconn *sc = appctx_sc(appctx);
struct spoe_agent *agent = SPOE_APPCTX(appctx)->agent;
char *frame;
int ret;
@@ -1697,7 +1697,7 @@
/* Do not forget to remove processed frame from the output buffer */
if (trash.data)
- co_skip(sc_oc(appctx_cs(appctx)), trash.data);
+ co_skip(sc_oc(appctx_sc(appctx)), trash.data);
end:
return ret;
}
@@ -1705,7 +1705,7 @@
static int
spoe_handle_processing_appctx(struct appctx *appctx)
{
- struct stconn *sc = appctx_cs(appctx);
+ struct stconn *sc = appctx_sc(appctx);
struct server *srv = objt_server(__sc_strm(sc)->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;
@@ -1828,7 +1828,7 @@
static int
spoe_handle_disconnect_appctx(struct appctx *appctx)
{
- struct stconn *sc = appctx_cs(appctx);
+ struct stconn *sc = appctx_sc(appctx);
struct spoe_agent *agent = SPOE_APPCTX(appctx)->agent;
char *frame, *buf;
int ret;
@@ -1881,7 +1881,7 @@
static int
spoe_handle_disconnecting_appctx(struct appctx *appctx)
{
- struct stconn *sc = appctx_cs(appctx);
+ struct stconn *sc = appctx_sc(appctx);
char *frame;
int ret;
@@ -1946,7 +1946,7 @@
static void
spoe_handle_appctx(struct appctx *appctx)
{
- struct stconn *sc = appctx_cs(appctx);
+ struct stconn *sc = appctx_sc(appctx);
struct spoe_agent *agent;
if (SPOE_APPCTX(appctx) == NULL)
diff --git a/src/hlua.c b/src/hlua.c
index 375b034..c2f0382 100644
--- a/src/hlua.c
+++ b/src/hlua.c
@@ -1933,7 +1933,7 @@
static void hlua_socket_handler(struct appctx *appctx)
{
struct hlua_csk_ctx *ctx = appctx->svcctx;
- struct stconn *sc = appctx_cs(appctx);
+ struct stconn *sc = appctx_sc(appctx);
if (ctx->die) {
sc_shutw(sc);
@@ -2401,7 +2401,7 @@
csk_ctx = container_of(peer, struct hlua_csk_ctx, xref);
appctx = csk_ctx->appctx;
- sc = appctx_cs(appctx);
+ sc = appctx_sc(appctx);
s = __sc_strm(sc);
/* Check for connection close. */
@@ -2635,7 +2635,7 @@
}
appctx = container_of(peer, struct hlua_csk_ctx, xref)->appctx;
- sc = appctx_cs(appctx);
+ sc = appctx_sc(appctx);
dst = sc_dst(sc_opposite(sc));
if (!dst) {
xref_unlock(&socket->xref, peer);
@@ -2842,7 +2842,7 @@
csk_ctx = container_of(peer, struct hlua_csk_ctx, xref);
appctx = csk_ctx->appctx;
- sc = appctx_cs(appctx);
+ sc = appctx_sc(appctx);
s = __sc_strm(sc);
if (!sockaddr_alloc(&sc_opposite(sc)->dst, addr, sizeof(*addr))) {
@@ -4479,7 +4479,7 @@
__LJMP static int hlua_applet_tcp_getline_yield(lua_State *L, int status, lua_KContext ctx)
{
struct hlua_appctx *luactx = MAY_LJMP(hlua_checkapplet_tcp(L, 1));
- struct stconn *sc = appctx_cs(luactx->appctx);
+ struct stconn *sc = appctx_sc(luactx->appctx);
int ret;
const char *blk1;
size_t len1;
@@ -4533,7 +4533,7 @@
__LJMP static int hlua_applet_tcp_recv_yield(lua_State *L, int status, lua_KContext ctx)
{
struct hlua_appctx *luactx = MAY_LJMP(hlua_checkapplet_tcp(L, 1));
- struct stconn *sc = appctx_cs(luactx->appctx);
+ struct stconn *sc = appctx_sc(luactx->appctx);
size_t len = MAY_LJMP(luaL_checkinteger(L, 2));
int ret;
const char *blk1;
@@ -4641,7 +4641,7 @@
struct hlua_appctx *luactx = MAY_LJMP(hlua_checkapplet_tcp(L, 1));
const char *str = MAY_LJMP(luaL_checklstring(L, 2, &len));
int l = MAY_LJMP(luaL_checkinteger(L, 3));
- struct stconn *sc = appctx_cs(luactx->appctx);
+ struct stconn *sc = appctx_sc(luactx->appctx);
struct channel *chn = sc_ic(sc);
int max;
@@ -4968,7 +4968,7 @@
__LJMP static int hlua_applet_http_getline_yield(lua_State *L, int status, lua_KContext ctx)
{
struct hlua_appctx *luactx = MAY_LJMP(hlua_checkapplet_http(L, 1));
- struct stconn *sc = appctx_cs(luactx->appctx);
+ struct stconn *sc = appctx_sc(luactx->appctx);
struct channel *req = sc_oc(sc);
struct htx *htx;
struct htx_blk *blk;
@@ -5063,7 +5063,7 @@
__LJMP static int hlua_applet_http_recv_yield(lua_State *L, int status, lua_KContext ctx)
{
struct hlua_appctx *luactx = MAY_LJMP(hlua_checkapplet_http(L, 1));
- struct stconn *sc = appctx_cs(luactx->appctx);
+ struct stconn *sc = appctx_sc(luactx->appctx);
struct channel *req = sc_oc(sc);
struct htx *htx;
struct htx_blk *blk;
@@ -5172,7 +5172,7 @@
__LJMP static int hlua_applet_http_send_yield(lua_State *L, int status, lua_KContext ctx)
{
struct hlua_appctx *luactx = MAY_LJMP(hlua_checkapplet_http(L, 1));
- struct stconn *sc = appctx_cs(luactx->appctx);
+ struct stconn *sc = appctx_sc(luactx->appctx);
struct channel *res = sc_ic(sc);
struct htx *htx = htx_from_buf(&res->buf);
const char *data;
@@ -5309,7 +5309,7 @@
{
struct hlua_appctx *luactx = MAY_LJMP(hlua_checkapplet_http(L, 1));
struct hlua_http_ctx *http_ctx = luactx->appctx->svcctx;
- struct stconn *sc = appctx_cs(luactx->appctx);
+ struct stconn *sc = appctx_sc(luactx->appctx);
struct channel *res = sc_ic(sc);
struct htx *htx;
struct htx_sl *sl;
@@ -5506,7 +5506,7 @@
__LJMP static int hlua_applet_http_start_response_yield(lua_State *L, int status, lua_KContext ctx)
{
struct hlua_appctx *luactx = MAY_LJMP(hlua_checkapplet_http(L, 1));
- struct stconn *sc = appctx_cs(luactx->appctx);
+ struct stconn *sc = appctx_sc(luactx->appctx);
struct channel *res = sc_ic(sc);
if (co_data(res)) {
@@ -9216,7 +9216,7 @@
static int hlua_applet_tcp_init(struct appctx *ctx)
{
struct hlua_tcp_ctx *tcp_ctx = applet_reserve_svcctx(ctx, sizeof(*tcp_ctx));
- struct stconn *sc = appctx_cs(ctx);
+ struct stconn *sc = appctx_sc(ctx);
struct stream *strm = __sc_strm(sc);
struct hlua *hlua;
struct task *task;
@@ -9314,7 +9314,7 @@
void hlua_applet_tcp_fct(struct appctx *ctx)
{
struct hlua_tcp_ctx *tcp_ctx = ctx->svcctx;
- struct stconn *sc = appctx_cs(ctx);
+ struct stconn *sc = appctx_sc(ctx);
struct stream *strm = __sc_strm(sc);
struct channel *res = sc_ic(sc);
struct act_rule *rule = ctx->rule;
@@ -9407,7 +9407,7 @@
static int hlua_applet_http_init(struct appctx *ctx)
{
struct hlua_http_ctx *http_ctx = applet_reserve_svcctx(ctx, sizeof(*http_ctx));
- struct stconn *sc = appctx_cs(ctx);
+ struct stconn *sc = appctx_sc(ctx);
struct stream *strm = __sc_strm(sc);
struct http_txn *txn;
struct hlua *hlua;
@@ -9510,7 +9510,7 @@
void hlua_applet_http_fct(struct appctx *ctx)
{
struct hlua_http_ctx *http_ctx = ctx->svcctx;
- struct stconn *sc = appctx_cs(ctx);
+ struct stconn *sc = appctx_sc(ctx);
struct stream *strm = __sc_strm(sc);
struct channel *req = sc_oc(sc);
struct channel *res = sc_ic(sc);
@@ -10147,7 +10147,7 @@
struct hlua_function *fcn;
hlua = ctx->hlua;
- sc = appctx_cs(appctx);
+ sc = appctx_sc(appctx);
fcn = ctx->fcn;
/* If the stream is disconnect or closed, ldo nothing. */
diff --git a/src/http_client.c b/src/http_client.c
index f1b5488..61cd3a0 100644
--- a/src/http_client.c
+++ b/src/http_client.c
@@ -195,7 +195,7 @@
static int hc_cli_io_handler(struct appctx *appctx)
{
struct hcli_svc_ctx *ctx = appctx->svcctx;
- struct stconn *sc = appctx_cs(appctx);
+ struct stconn *sc = appctx_sc(appctx);
struct buffer *trash = alloc_trash_chunk();
struct httpclient *hc = ctx->hc;
struct http_hdr *hdrs, *hdr;
@@ -636,7 +636,7 @@
static void httpclient_applet_io_handler(struct appctx *appctx)
{
struct httpclient *hc = appctx->svcctx;
- struct stconn *sc = appctx_cs(appctx);
+ struct stconn *sc = appctx_sc(appctx);
struct stream *s = __sc_strm(sc);
struct channel *req = &s->req;
struct channel *res = &s->res;
diff --git a/src/log.c b/src/log.c
index c6dbc5e..e25d2e7 100644
--- a/src/log.c
+++ b/src/log.c
@@ -3559,7 +3559,7 @@
static void syslog_io_handler(struct appctx *appctx)
{
static THREAD_LOCAL struct ist metadata[LOG_META_FIELDS];
- struct stconn *sc = appctx_cs(appctx);
+ struct stconn *sc = appctx_sc(appctx);
struct stream *s = __sc_strm(sc);
struct proxy *frontend = strm_fe(s);
struct listener *l = strm_li(s);
diff --git a/src/map.c b/src/map.c
index 8308a7a..52ddb5c 100644
--- a/src/map.c
+++ b/src/map.c
@@ -345,7 +345,7 @@
static int cli_io_handler_pat_list(struct appctx *appctx)
{
struct show_map_ctx *ctx = appctx->svcctx;
- struct stconn *sc = appctx_cs(appctx);
+ struct stconn *sc = appctx_sc(appctx);
struct pat_ref_elt *elt;
if (unlikely(sc_ic(sc)->flags & (CF_WRITE_ERROR|CF_SHUTW))) {
diff --git a/src/mworker.c b/src/mworker.c
index e0a5df0..6a4fce4 100644
--- a/src/mworker.c
+++ b/src/mworker.c
@@ -509,7 +509,7 @@
/* Displays workers and processes */
static int cli_io_handler_show_proc(struct appctx *appctx)
{
- struct stconn *sc = appctx_cs(appctx);
+ struct stconn *sc = appctx_sc(appctx);
struct mworker_proc *child;
int old = 0;
int up = now.tv_sec - proc_self->timestamp;
diff --git a/src/peers.c b/src/peers.c
index 6718034..da83a79 100644
--- a/src/peers.c
+++ b/src/peers.c
@@ -1167,7 +1167,7 @@
*/
static inline int peer_getline(struct appctx *appctx)
{
- struct stconn *sc = appctx_cs(appctx);
+ struct stconn *sc = appctx_sc(appctx);
int n;
n = co_getline(sc_oc(sc), trash.area, trash.size);
@@ -1201,7 +1201,7 @@
struct peer_prep_params *params)
{
int ret, msglen;
- struct stconn *sc = appctx_cs(appctx);
+ struct stconn *sc = appctx_sc(appctx);
msglen = peer_prepare_msg(trash.area, trash.size, params);
if (!msglen) {
@@ -1681,7 +1681,7 @@
static int peer_treat_updatemsg(struct appctx *appctx, struct peer *p, int updt, int exp,
char **msg_cur, char *msg_end, int msg_len, int totl)
{
- struct stconn *sc = appctx_cs(appctx);
+ struct stconn *sc = appctx_sc(appctx);
struct shared_table *st = p->remote_table;
struct stksess *ts, *newts;
uint32_t update;
@@ -2133,7 +2133,7 @@
static inline int peer_treat_definemsg(struct appctx *appctx, struct peer *p,
char **msg_cur, char *msg_end, int totl)
{
- struct stconn *sc = appctx_cs(appctx);
+ struct stconn *sc = appctx_sc(appctx);
int table_id_len;
struct shared_table *st;
int table_type;
@@ -2332,7 +2332,7 @@
uint32_t *msg_len, int *totl)
{
int reql;
- struct stconn *sc = appctx_cs(appctx);
+ struct stconn *sc = appctx_sc(appctx);
char *cur;
reql = co_getblk(sc_oc(sc), msg_head, 2 * sizeof(char), *totl);
@@ -2850,7 +2850,7 @@
*/
static void peer_io_handler(struct appctx *appctx)
{
- struct stconn *sc = appctx_cs(appctx);
+ struct stconn *sc = appctx_sc(appctx);
struct stream *s = __sc_strm(sc);
struct peers *curpeers = strm_fe(s)->parent;
struct peer *curpeer = NULL;
@@ -3817,7 +3817,7 @@
chunk_appendf(&trash, " appctx:%p st0=%d st1=%d task_calls=%u", appctx, appctx->st0, appctx->st1,
appctx->t ? appctx->t->calls : 0);
- peer_cs = appctx_cs(peer->appctx);
+ peer_cs = appctx_sc(peer->appctx);
peer_s = __sc_strm(peer_cs);
chunk_appendf(&trash, " state=%s", sc_state_str(sc_opposite(peer_cs)->state));
@@ -3968,7 +3968,7 @@
ctx->state = STATE_DONE;
}
else {
- if (!peers_dump_peer(&trash, appctx_cs(appctx), ctx->peer, ctx->flags))
+ if (!peers_dump_peer(&trash, appctx_sc(appctx), ctx->peer, ctx->flags))
goto out;
ctx->peer = ctx->peer->next;
diff --git a/src/proxy.c b/src/proxy.c
index 02fc3ca..3dc1d24 100644
--- a/src/proxy.c
+++ b/src/proxy.c
@@ -2786,7 +2786,7 @@
static int cli_io_handler_servers_state(struct appctx *appctx)
{
struct show_srv_ctx *ctx = appctx->svcctx;
- struct stconn *sc = appctx_cs(appctx);
+ struct stconn *sc = appctx_sc(appctx);
struct proxy *curproxy;
if (ctx->state == SHOW_SRV_HEAD) {
@@ -3138,7 +3138,7 @@
static int cli_io_handler_show_errors(struct appctx *appctx)
{
struct show_errors_ctx *ctx = appctx->svcctx;
- struct stconn *sc = appctx_cs(appctx);
+ struct stconn *sc = appctx_sc(appctx);
extern const char *monthname[12];
if (unlikely(sc_ic(sc)->flags & (CF_WRITE_ERROR|CF_SHUTW)))
diff --git a/src/ring.c b/src/ring.c
index 3c3dcdd..7c36f7b 100644
--- a/src/ring.c
+++ b/src/ring.c
@@ -290,7 +290,7 @@
int cli_io_handler_show_ring(struct appctx *appctx)
{
struct show_ring_ctx *ctx = appctx->svcctx;
- struct stconn *sc = appctx_cs(appctx);
+ struct stconn *sc = appctx_sc(appctx);
struct ring *ring = ctx->ring;
struct buffer *buf = &ring->buf;
size_t ofs = ctx->ofs;
diff --git a/src/sink.c b/src/sink.c
index fff70e9..0891bb3 100644
--- a/src/sink.c
+++ b/src/sink.c
@@ -299,7 +299,7 @@
*/
static void sink_forward_io_handler(struct appctx *appctx)
{
- struct stconn *sc = appctx_cs(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;
@@ -438,7 +438,7 @@
*/
static void sink_forward_oc_io_handler(struct appctx *appctx)
{
- struct stconn *sc = appctx_cs(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;
diff --git a/src/ssl_ckch.c b/src/ssl_ckch.c
index 3ac7ae5..f574fc4 100644
--- a/src/ssl_ckch.c
+++ b/src/ssl_ckch.c
@@ -2044,7 +2044,7 @@
static int cli_io_handler_commit_cert(struct appctx *appctx)
{
struct commit_cert_ctx *ctx = appctx->svcctx;
- struct stconn *sc = appctx_cs(appctx);
+ struct stconn *sc = appctx_sc(appctx);
int y = 0;
char *err = NULL;
struct ckch_store *old_ckchs, *new_ckchs = NULL;
@@ -2785,7 +2785,7 @@
static int cli_io_handler_commit_cafile_crlfile(struct appctx *appctx)
{
struct commit_cacrlfile_ctx *ctx = appctx->svcctx;
- struct stconn *sc = appctx_cs(appctx);
+ struct stconn *sc = appctx_sc(appctx);
int y = 0;
char *err = NULL;
struct cafile_entry *old_cafile_entry = NULL, *new_cafile_entry = NULL;
diff --git a/src/ssl_crtlist.c b/src/ssl_crtlist.c
index ece79f5..3186068 100644
--- a/src/ssl_crtlist.c
+++ b/src/ssl_crtlist.c
@@ -1063,7 +1063,7 @@
{
struct add_crtlist_ctx *ctx = appctx->svcctx;
struct bind_conf_list *bind_conf_node;
- struct stconn *sc = appctx_cs(appctx);
+ struct stconn *sc = appctx_sc(appctx);
struct crtlist *crtlist = ctx->crtlist;
struct crtlist_entry *entry = ctx->entry;
struct ckch_store *store = entry->node.key;
diff --git a/src/stats.c b/src/stats.c
index 7f45dee..dc9b040 100644
--- a/src/stats.c
+++ b/src/stats.c
@@ -4283,7 +4283,7 @@
static void http_stats_io_handler(struct appctx *appctx)
{
struct show_stat_ctx *ctx = appctx->svcctx;
- struct stconn *sc = appctx_cs(appctx);
+ struct stconn *sc = appctx_sc(appctx);
struct stream *s = __sc_strm(sc);
struct channel *req = sc_oc(sc);
struct channel *res = sc_ic(sc);
@@ -5000,7 +5000,7 @@
static int cli_io_handler_dump_info(struct appctx *appctx)
{
- return stats_dump_info_to_buffer(appctx_cs(appctx));
+ return stats_dump_info_to_buffer(appctx_sc(appctx));
}
/* This I/O handler runs as an applet embedded in a stream connector. It is
@@ -5008,7 +5008,7 @@
*/
static int cli_io_handler_dump_stat(struct appctx *appctx)
{
- return stats_dump_stat_to_buffer(appctx_cs(appctx), NULL, NULL);
+ return stats_dump_stat_to_buffer(appctx_sc(appctx), NULL, NULL);
}
static int cli_io_handler_dump_json_schema(struct appctx *appctx)
diff --git a/src/stick_table.c b/src/stick_table.c
index 3e1f3a5..9112996 100644
--- a/src/stick_table.c
+++ b/src/stick_table.c
@@ -4242,7 +4242,7 @@
struct appctx *appctx,
struct stktable *t, struct stktable *target)
{
- struct stream *s = __sc_strm(appctx_cs(appctx));
+ struct stream *s = __sc_strm(appctx_sc(appctx));
chunk_appendf(msg, "# table: %s, type: %s, size:%d, used:%d\n",
t->id, stktable_types[t->type].kw, t->size, t->current);
@@ -4663,7 +4663,7 @@
static int cli_io_handler_table(struct appctx *appctx)
{
struct show_table_ctx *ctx = appctx->svcctx;
- struct stconn *sc = appctx_cs(appctx);
+ struct stconn *sc = appctx_sc(appctx);
struct stream *s = __sc_strm(sc);
struct ebmb_node *eb;
int skip_entry;
diff --git a/src/stream.c b/src/stream.c
index 8b513d4..127a5ab 100644
--- a/src/stream.c
+++ b/src/stream.c
@@ -3524,7 +3524,7 @@
static int cli_io_handler_dump_sess(struct appctx *appctx)
{
struct show_sess_ctx *ctx = appctx->svcctx;
- struct stconn *sc = appctx_cs(appctx);
+ struct stconn *sc = appctx_sc(appctx);
struct connection *conn;
thread_isolate();