/* returns the channel which receives data from this stream interface (input channel) */
static inline struct channel *si_ic(struct stream_interface *si)
{
- struct stream *strm = cs_strm(si->cs);
+ struct stream *strm = __cs_strm(si->cs);
- ALREADY_CHECKED(strm);
return ((si->flags & SI_FL_ISBACK) ? &(strm->res) : &(strm->req));
}
/* returns the channel which feeds data to this stream interface (output channel) */
static inline struct channel *si_oc(struct stream_interface *si)
{
- struct stream *strm = cs_strm(si->cs);
+ struct stream *strm = __cs_strm(si->cs);
- ALREADY_CHECKED(strm);
return ((si->flags & SI_FL_ISBACK) ? &(strm->req) : &(strm->res));
}
/* returns the stream associated to a stream interface */
static inline struct stream *si_strm(struct stream_interface *si)
{
- struct stream *strm = cs_strm(si->cs);
-
- ALREADY_CHECKED(strm);
- return strm;
+ return __cs_strm(si->cs);
}
/* returns the task associated to this stream interface */
static inline struct task *si_task(struct stream_interface *si)
{
- struct stream *strm = cs_strm(si->cs);
+ struct stream *strm = __cs_strm(si->cs);
- ALREADY_CHECKED(strm);
return strm->task;
}
/* returns the stream interface on the other side. Used during forwarding. */
static inline struct stream_interface *si_opposite(struct stream_interface *si)
{
- struct stream *strm = cs_strm(si->cs);
+ struct stream *strm = __cs_strm(si->cs);
- ALREADY_CHECKED(strm);
return ((si->flags & SI_FL_ISBACK) ? strm->csf->si : strm->csb->si);
}
{
struct appctx *appctx;
- appctx = cs_appctx(si->cs);
- if (appctx && appctx->applet->release && !si_state_in(si->state, SI_SB_DIS|SI_SB_CLO))
+ appctx = __cs_appctx(si->cs);
+ if (appctx->applet->release && !si_state_in(si->state, SI_SB_DIS|SI_SB_CLO))
appctx->applet->release(appctx);
}
static int wake_srv_chk(struct conn_stream *cs)
{
struct connection *conn;
- struct check *check = cs_check(cs);
+ struct check *check = __cs_check(cs);
struct email_alertq *q = container_of(check, typeof(*q), check);
int ret = 0;
return 2;
}
- appctx = cs_appctx(s->csf);
- ALREADY_CHECKED(appctx);
+ appctx = __cs_appctx(s->csf);
/* Check for connection established. */
if (appctx->ctx.hlua_cosocket.connected) {
struct http_msg *msg = &txn->req;
struct uri_auth *uri_auth = s->be->uri_auth;
const char *h, *lookup, *end;
- struct appctx *appctx;
+ struct appctx *appctx = __cs_appctx(s->csb);
struct htx *htx;
struct htx_sl *sl;
- appctx = cs_appctx(s->csb);
- ALREADY_CHECKED(appctx);
memset(&appctx->ctx.stats, 0, sizeof(appctx->ctx.stats));
appctx->st1 = appctx->st2 = 0;
appctx->ctx.stats.st_code = STAT_STATUS_INIT;
chunk_printf(&trash, "%08x:%s.%s[%04x:%04x]: ", s->uniq_id, s->be->id,
dir,
objt_conn(sess->origin) ? (unsigned short)__objt_conn(sess->origin)->handle.fd : -1,
- cs_conn(s->csb) ? (unsigned short)(cs_conn(s->csb))->handle.fd : -1);
+ cs_conn(s->csb) ? (unsigned short)(__cs_conn(s->csb))->handle.fd : -1);
max = HTX_SL_P1_LEN(sl);
UBOUND(max, trash.size - trash.data - 3);
chunk_printf(&trash, "%08x:%s.%s[%04x:%04x]: ", s->uniq_id, s->be->id,
dir,
objt_conn(sess->origin) ? (unsigned short)__objt_conn(sess->origin)->handle.fd : -1,
- cs_conn(s->csb) ? (unsigned short)(cs_conn(s->csb))->handle.fd : -1);
+ cs_conn(s->csb) ? (unsigned short)(__cs_conn(s->csb))->handle.fd : -1);
max = n.len;
UBOUND(max, trash.size - trash.data - 3);
if (fstrm->cs && cs_strm(fstrm->cs)) {
if (sess == NULL)
- sess = cs_strm(fstrm->cs)->sess;
+ sess = __cs_strm(fstrm->cs)->sess;
if (!(h1m->flags & H1_MF_RESP))
- other_end = cs_strm(fstrm->cs)->be;
+ other_end = __cs_strm(fstrm->cs)->be;
else
other_end = sess->fe;
} else
if ((h1c->flags & H1C_F_ST_ATTACHED) && cs_strm(h1s->cs)) {
if (sess == NULL)
- sess = cs_strm(h1s->cs)->sess;
+ sess = __cs_strm(h1s->cs)->sess;
if (!(h1m->flags & H1_MF_RESP))
- other_end = cs_strm(h1s->cs)->be;
+ other_end = __cs_strm(h1s->cs)->be;
else
other_end = sess->fe;
} else
*/
static void mux_pt_detach(struct conn_stream *cs)
{
- struct connection *conn = cs_conn(cs);
+ struct connection *conn = __cs_conn(cs);
struct mux_pt_ctx *ctx;
ALREADY_CHECKED(conn);
static void mux_pt_shutr(struct conn_stream *cs, enum cs_shr_mode mode)
{
- struct connection *conn = cs_conn(cs);
+ struct connection *conn = __cs_conn(cs);
TRACE_ENTER(PT_EV_STRM_SHUT, conn, cs);
static void mux_pt_shutw(struct conn_stream *cs, enum cs_shw_mode mode)
{
- struct connection *conn = cs_conn(cs);
+ struct connection *conn = __cs_conn(cs);
TRACE_ENTER(PT_EV_STRM_SHUT, conn, cs);
*/
static size_t mux_pt_rcv_buf(struct conn_stream *cs, struct buffer *buf, size_t count, int flags)
{
- struct connection *conn = cs_conn(cs);
+ struct connection *conn = __cs_conn(cs);
size_t ret = 0;
TRACE_ENTER(PT_EV_RX_DATA, conn, cs, buf, (size_t[]){count});
/* Called from the upper layer, to send data */
static size_t mux_pt_snd_buf(struct conn_stream *cs, struct buffer *buf, size_t count, int flags)
{
- struct connection *conn = cs_conn(cs);
+ struct connection *conn = __cs_conn(cs);
size_t ret;
TRACE_ENTER(PT_EV_TX_DATA, conn, cs, buf, (size_t[]){count});
*/
static int mux_pt_subscribe(struct conn_stream *cs, int event_type, struct wait_event *es)
{
- struct connection *conn = cs_conn(cs);
+ struct connection *conn = __cs_conn(cs);
TRACE_POINT(PT_EV_RX_DATA|PT_EV_TX_DATA, conn, cs, 0, (size_t[]){event_type});
return conn->xprt->subscribe(conn, conn->xprt_ctx, event_type, es);
*/
static int mux_pt_unsubscribe(struct conn_stream *cs, int event_type, struct wait_event *es)
{
- struct connection *conn = cs_conn(cs);
+ struct connection *conn = __cs_conn(cs);
TRACE_POINT(PT_EV_RX_DATA|PT_EV_TX_DATA, conn, cs, 0, (size_t[]){event_type});
return conn->xprt->unsubscribe(conn, conn->xprt_ctx, event_type, es);
/* Send and get, using splicing */
static int mux_pt_rcv_pipe(struct conn_stream *cs, struct pipe *pipe, unsigned int count)
{
- struct connection *conn = cs_conn(cs);
+ struct connection *conn = __cs_conn(cs);
int ret;
TRACE_ENTER(PT_EV_RX_DATA, conn, cs, 0, (size_t[]){count});
static int mux_pt_snd_pipe(struct conn_stream *cs, struct pipe *pipe)
{
- struct connection *conn = cs_conn(cs);
+ struct connection *conn = __cs_conn(cs);
int ret;
TRACE_ENTER(PT_EV_TX_DATA, conn, cs, 0, (size_t[]){pipe->data});
*/
static int dump_servers_state(struct stream_interface *si)
{
- struct appctx *appctx = cs_appctx(si->cs);
- struct proxy *px;
+ struct appctx *appctx = __cs_appctx(si->cs);
+ struct proxy *px = appctx->ctx.cli.p0;
struct server *srv;
char srv_addr[INET6_ADDRSTRLEN + 1];
char srv_agent_addr[INET6_ADDRSTRLEN + 1];
int bk_f_forced_id, srv_f_forced_id;
char *srvrecord;
- ALREADY_CHECKED(appctx);
- px = appctx->ctx.cli.p0;
-
if (!appctx->ctx.cli.p1)
appctx->ctx.cli.p1 = px->srv;
struct field *stats, size_t stats_count,
struct list *stat_modules)
{
- struct appctx *appctx = cs_appctx(si->cs);
+ struct appctx *appctx = __cs_appctx(si->cs);
struct channel *rep = si_ic(si);
struct stats_module *mod;
size_t idx = 0;
struct field *stats, size_t stats_count,
struct list *stat_modules)
{
- struct appctx *appctx = cs_appctx(si->cs);
+ struct appctx *appctx = __cs_appctx(si->cs);
struct channel *rep = si_ic(si);
struct resolvers *resolver = appctx->ctx.stats.obj1;
struct dns_nameserver *ns = appctx->ctx.stats.obj2;
*/
static int stats_dump_fe_stats(struct stream_interface *si, struct proxy *px)
{
- struct appctx *appctx = cs_appctx(si->cs);
+ struct appctx *appctx = __cs_appctx(si->cs);
struct field *stats = stat_l[STATS_DOMAIN_PROXY];
struct stats_module *mod;
size_t stats_count = ST_F_TOTAL_FIELDS;
*/
static int stats_dump_li_stats(struct stream_interface *si, struct proxy *px, struct listener *l)
{
- struct appctx *appctx = cs_appctx(si->cs);
+ struct appctx *appctx = __cs_appctx(si->cs);
struct field *stats = stat_l[STATS_DOMAIN_PROXY];
struct stats_module *mod;
size_t stats_count = ST_F_TOTAL_FIELDS;
- ALREADY_CHECKED(appctx);
-
memset(stats, 0, sizeof(struct field) * stat_count[STATS_DOMAIN_PROXY]);
if (!stats_fill_li_stats(px, l, appctx->ctx.stats.flags, stats,
*/
static int stats_dump_sv_stats(struct stream_interface *si, struct proxy *px, struct server *sv)
{
- struct appctx *appctx = cs_appctx(si->cs);
+ struct appctx *appctx = __cs_appctx(si->cs);
struct stats_module *mod;
struct field *stats = stat_l[STATS_DOMAIN_PROXY];
size_t stats_count = ST_F_TOTAL_FIELDS;
- ALREADY_CHECKED(appctx);
-
memset(stats, 0, sizeof(struct field) * stat_count[STATS_DOMAIN_PROXY]);
if (!stats_fill_sv_stats(px, sv, appctx->ctx.stats.flags, stats,
*/
static int stats_dump_be_stats(struct stream_interface *si, struct proxy *px)
{
- struct appctx *appctx = cs_appctx(si->cs);
+ struct appctx *appctx = __cs_appctx(si->cs);
struct field *stats = stat_l[STATS_DOMAIN_PROXY];
struct stats_module *mod;
size_t stats_count = ST_F_TOTAL_FIELDS;
*/
static void stats_dump_html_px_hdr(struct stream_interface *si, struct proxy *px)
{
- struct appctx *appctx = cs_appctx(si->cs);
+ struct appctx *appctx = __cs_appctx(si->cs);
char scope_txt[STAT_SCOPE_TXT_MAXLEN + sizeof STAT_SCOPE_PATTERN];
struct stats_module *mod;
int stats_module_len = 0;
*/
static void stats_dump_html_px_end(struct stream_interface *si, struct proxy *px)
{
- struct appctx *appctx = cs_appctx(si->cs);
+ struct appctx *appctx = __cs_appctx(si->cs);
+
chunk_appendf(&trash, "</table>");
if ((px->cap & PR_CAP_BE) && px->srv && (appctx->ctx.stats.flags & STAT_ADMIN)) {
int stats_dump_proxy_to_buffer(struct stream_interface *si, struct htx *htx,
struct proxy *px, struct uri_auth *uri)
{
- struct appctx *appctx = cs_appctx(si->cs);
+ struct appctx *appctx = __cs_appctx(si->cs);
struct stream *s = si_strm(si);
struct channel *rep = si_ic(si);
struct server *sv, *svs; /* server and server-state, server-state=server or server->track */
*/
static void stats_dump_html_info(struct stream_interface *si, struct uri_auth *uri)
{
- struct appctx *appctx = cs_appctx(si->cs);
+ struct appctx *appctx = __cs_appctx(si->cs);
unsigned int up = (now.tv_sec - start_date.tv_sec);
char scope_txt[STAT_SCOPE_TXT_MAXLEN + sizeof STAT_SCOPE_PATTERN];
const char *scope_ptr = stats_scope_ptr(appctx, si);
struct htx *htx,
struct uri_auth *uri)
{
- struct appctx *appctx = cs_appctx(si->cs);
+ struct appctx *appctx = __cs_appctx(si->cs);
struct channel *rep = si_ic(si);
struct proxy *px;
static int stats_dump_stat_to_buffer(struct stream_interface *si, struct htx *htx,
struct uri_auth *uri)
{
- struct appctx *appctx = cs_appctx(si->cs);
+ struct appctx *appctx = __cs_appctx(si->cs);
struct channel *rep = si_ic(si);
enum stats_domain domain = appctx->ctx.stats.domain;
static int stats_process_http_post(struct stream_interface *si)
{
struct stream *s = si_strm(si);
- struct appctx *appctx = cs_appctx(si->cs);
+ struct appctx *appctx = __cs_appctx(si->cs);
struct proxy *px = NULL;
struct server *sv = NULL;
{
struct stream *s = si_strm(si);
struct uri_auth *uri = s->be->uri_auth;
- struct appctx *appctx = cs_appctx(si->cs);
+ struct appctx *appctx = __cs_appctx(si->cs);
struct htx_sl *sl;
unsigned int flags;
char scope_txt[STAT_SCOPE_TXT_MAXLEN + sizeof STAT_SCOPE_PATTERN];
struct stream *s = si_strm(si);
struct uri_auth *uri = s->be->uri_auth;
- struct appctx *appctx = cs_appctx(si->cs);
+ struct appctx *appctx = __cs_appctx(si->cs);
struct htx_sl *sl;
unsigned int flags;
- ALREADY_CHECKED(appctx);
-
/* scope_txt = search pattern + search query, appctx->ctx.stats.scope_len is always <= STAT_SCOPE_TXT_MAXLEN */
scope_txt[0] = 0;
if (appctx->ctx.stats.scope_len) {
*/
static int stats_dump_info_to_buffer(struct stream_interface *si)
{
- struct appctx *appctx = cs_appctx(si->cs);
-
- ALREADY_CHECKED(appctx);
+ struct appctx *appctx = __cs_appctx(si->cs);
if (!stats_fill_info(info, INF_TOTAL_FIELDS, appctx->ctx.stats.flags))
return 0;
*/
int stream_upgrade_from_cs(struct conn_stream *cs, struct buffer *input)
{
- struct stream *s = cs_strm(cs);
-
- if (cs_conn_mux(cs)) {
- const struct mux_ops *mux = DISGUISE(cs_conn_mux(cs));
+ struct stream *s = __cs_strm(cs);
+ const struct mux_ops *mux = cs_conn_mux(cs);
+ if (mux) {
if (mux->flags & MX_FL_HTX)
s->flags |= SF_HTX;
}
appctx->rule = rule;
}
else
- appctx = cs_appctx(s->csb);
+ appctx = __cs_appctx(s->csb);
/* Stops the applet scheduling, in case of the init function miss
* some data.
if (!(req->flags & (CF_KERN_SPLICING|CF_SHUTR)) &&
req->to_forward &&
(global.tune.options & GTUNE_USE_SPLICE) &&
- (cs_conn(si_f->cs) && cs_conn(si_f->cs)->xprt && cs_conn(si_f->cs)->xprt->rcv_pipe &&
- cs_conn(si_f->cs)->mux && cs_conn(si_f->cs)->mux->rcv_pipe) &&
- (cs_conn(si_b->cs) && cs_conn(si_b->cs)->xprt && cs_conn(si_b->cs)->xprt->snd_pipe &&
- cs_conn(si_b->cs)->mux && cs_conn(si_b->cs)->mux->snd_pipe) &&
+ (cs_conn(si_f->cs) && __cs_conn(si_f->cs)->xprt && __cs_conn(si_f->cs)->xprt->rcv_pipe &&
+ __cs_conn(si_f->cs)->mux && __cs_conn(si_f->cs)->mux->rcv_pipe) &&
+ (cs_conn(si_b->cs) && __cs_conn(si_b->cs)->xprt && __cs_conn(si_b->cs)->xprt->snd_pipe &&
+ __cs_conn(si_b->cs)->mux && __cs_conn(si_b->cs)->mux->snd_pipe) &&
(pipes_used < global.maxpipes) &&
(((sess->fe->options2|s->be->options2) & PR_O2_SPLIC_REQ) ||
(((sess->fe->options2|s->be->options2) & PR_O2_SPLIC_AUT) &&
if (!(res->flags & (CF_KERN_SPLICING|CF_SHUTR)) &&
res->to_forward &&
(global.tune.options & GTUNE_USE_SPLICE) &&
- (cs_conn(si_f->cs) && cs_conn(si_f->cs)->xprt && cs_conn(si_f->cs)->xprt->snd_pipe &&
- cs_conn(si_f->cs)->mux && cs_conn(si_f->cs)->mux->snd_pipe) &&
- (cs_conn(si_b->cs) && cs_conn(si_b->cs)->xprt && cs_conn(si_b->cs)->xprt->rcv_pipe &&
- cs_conn(si_b->cs)->mux && cs_conn(si_b->cs)->mux->rcv_pipe) &&
+ (cs_conn(si_f->cs) && __cs_conn(si_f->cs)->xprt && __cs_conn(si_f->cs)->xprt->snd_pipe &&
+ __cs_conn(si_f->cs)->mux && __cs_conn(si_f->cs)->mux->snd_pipe) &&
+ (cs_conn(si_b->cs) && __cs_conn(si_b->cs)->xprt && __cs_conn(si_b->cs)->xprt->rcv_pipe &&
+ __cs_conn(si_b->cs)->mux && __cs_conn(si_b->cs)->mux->rcv_pipe) &&
(pipes_used < global.maxpipes) &&
(((sess->fe->options2|s->be->options2) & PR_O2_SPLIC_RTR) ||
(((sess->fe->options2|s->be->options2) & PR_O2_SPLIC_AUT) &&
si_b->prev_state == SI_ST_EST) {
chunk_printf(&trash, "%08x:%s.srvcls[%04x:%04x]\n",
s->uniq_id, s->be->id,
- cs_conn(si_f->cs) ? (unsigned short)cs_conn(si_f->cs)->handle.fd : -1,
- cs_conn(si_b->cs) ? (unsigned short)cs_conn(si_b->cs)->handle.fd : -1);
+ cs_conn(si_f->cs) ? (unsigned short)__cs_conn(si_f->cs)->handle.fd : -1,
+ cs_conn(si_b->cs) ? (unsigned short)__cs_conn(si_b->cs)->handle.fd : -1);
DISGUISE(write(1, trash.area, trash.data));
}
si_f->prev_state == SI_ST_EST) {
chunk_printf(&trash, "%08x:%s.clicls[%04x:%04x]\n",
s->uniq_id, s->be->id,
- cs_conn(si_f->cs) ? (unsigned short)cs_conn(si_f->cs)->handle.fd : -1,
- cs_conn(si_b->cs) ? (unsigned short)cs_conn(si_b->cs)->handle.fd : -1);
+ cs_conn(si_f->cs) ? (unsigned short)__cs_conn(si_f->cs)->handle.fd : -1,
+ cs_conn(si_b->cs) ? (unsigned short)__cs_conn(si_b->cs)->handle.fd : -1);
DISGUISE(write(1, trash.area, trash.data));
}
}
(!(global.mode & MODE_QUIET) || (global.mode & MODE_VERBOSE)))) {
chunk_printf(&trash, "%08x:%s.closed[%04x:%04x]\n",
s->uniq_id, s->be->id,
- cs_conn(si_f->cs) ? (unsigned short)cs_conn(si_f->cs)->handle.fd : -1,
- cs_conn(si_b->cs) ? (unsigned short)cs_conn(si_b->cs)->handle.fd : -1);
+ cs_conn(si_f->cs) ? (unsigned short)__cs_conn(si_f->cs)->handle.fd : -1,
+ cs_conn(si_b->cs) ? (unsigned short)__cs_conn(si_b->cs)->handle.fd : -1);
DISGUISE(write(1, trash.area, trash.data));
}
*/
static int stats_dump_full_strm_to_buffer(struct stream_interface *si, struct stream *strm)
{
- struct appctx *appctx = cs_appctx(si->cs);
+ struct appctx *appctx = __cs_appctx(si->cs);
struct tm tm;
extern const char *monthname[12];
char pn[INET6_ADDRSTRLEN];
struct connection *conn;
struct appctx *tmpctx;
- ALREADY_CHECKED(appctx);
-
chunk_reset(&trash);
if (appctx->ctx.sess.section > 0 && appctx->ctx.sess.uid != strm->uniq_id) {
*/
if (cs && cs->data_cb == &si_conn_cb) {
- struct stream *strm = cs_strm(cs);
-
ret = make_proxy_line(trash.area, trash.size,
objt_server(conn->target),
cs_conn(si_opposite(cs_si(cs))->cs),
- strm);
+ cs_strm(cs));
}
else {
/* The target server expects a LOCAL line to be sent first. Retrieving
*/
static int si_cs_process(struct conn_stream *cs)
{
- struct connection *conn = cs_conn(cs);
+ struct connection *conn = __cs_conn(cs);
struct stream_interface *si = cs_si(cs);
struct channel *ic = si_ic(si);
struct channel *oc = si_oc(si);
*/
int si_cs_send(struct conn_stream *cs)
{
- struct connection *conn = cs_conn(cs);
+ struct connection *conn = __cs_conn(cs);
struct stream_interface *si = cs_si(cs);
struct channel *oc = si_oc(si);
int ret;
int did_send = 0;
- BUG_ON(!conn);
-
if (conn->flags & CO_FL_ERROR || cs->flags & (CS_FL_ERROR|CS_FL_ERR_PENDING)) {
/* We're probably there because the tasklet was woken up,
* but process_stream() ran before, detected there were an
if (cs_appctx(si_f->cs) &&
((si_rx_endp_ready(si_f) && !si_rx_blocked(si_f)) ||
(si_tx_endp_ready(si_f) && !si_tx_blocked(si_f))))
- appctx_wakeup(cs_appctx(si_f->cs));
+ appctx_wakeup(__cs_appctx(si_f->cs));
if (cs_appctx(si_b->cs) &&
((si_rx_endp_ready(si_b) && !si_rx_blocked(si_b)) ||
(si_tx_endp_ready(si_b) && !si_tx_blocked(si_b))))
- appctx_wakeup(cs_appctx(si_b->cs));
+ appctx_wakeup(__cs_appctx(si_b->cs));
}
/*
*/
int si_cs_recv(struct conn_stream *cs)
{
- struct connection *conn = cs_conn(cs);
+ struct connection *conn = __cs_conn(cs);
struct stream_interface *si = cs_si(cs);
struct channel *ic = si_ic(si);
int ret, max, cur_read = 0;
int read_poll = MAX_READ_POLL_LOOPS;
int flags = 0;
- BUG_ON(!conn);
-
/* If not established yet, do nothing. */
if (si->state != SI_ST_EST)
return 0;
{
struct channel *ic = si_ic(si);
+ BUG_ON(cs_appctx(si->cs));
+
/* If the applet wants to write and the channel is closed, it's a
* broken pipe and it must be reported.
*/
*/
if ((si_rx_endp_ready(si) && !si_rx_blocked(si)) ||
(si_tx_endp_ready(si) && !si_tx_blocked(si)))
- appctx_wakeup(cs_appctx(si->cs));
+ appctx_wakeup(__cs_appctx(si->cs));
}
/*
{
struct channel *ic = si_ic(si);
+ BUG_ON(cs_appctx(si->cs));
+
si_rx_shut_blk(si);
if (ic->flags & CF_SHUTR)
return;
struct channel *ic = si_ic(si);
struct channel *oc = si_oc(si);
+ BUG_ON(cs_appctx(si->cs));
+
oc->flags &= ~CF_SHUTW_NOW;
if (oc->flags & CF_SHUTW)
return;
}
/* on shutw we always wake the applet up */
- appctx_wakeup(cs_appctx(si->cs));
+ appctx_wakeup(__cs_appctx(si->cs));
switch (si->state) {
case SI_ST_RDY:
{
struct channel *ic = si_ic(si);
+ BUG_ON(cs_appctx(si->cs));
+
DPRINTF(stderr, "%s: si=%p, si->state=%d ic->flags=%08x oc->flags=%08x\n",
__FUNCTION__,
si, si->state, ic->flags, si_oc(si)->flags);
if (!ic->pipe) {
/* (re)start reading */
- appctx_wakeup(cs_appctx(si->cs));
+ appctx_wakeup(__cs_appctx(si->cs));
}
}
{
struct channel *oc = si_oc(si);
+ BUG_ON(cs_appctx(si->cs));
+
DPRINTF(stderr, "%s: si=%p, si->state=%d ic->flags=%08x oc->flags=%08x\n",
__FUNCTION__,
si, si->state, si_ic(si)->flags, oc->flags);
if (!channel_is_empty(oc)) {
/* (re)start sending */
- appctx_wakeup(cs_appctx(si->cs));
+ appctx_wakeup(__cs_appctx(si->cs));
}
}
enum tcpcheck_eval_ret ret = TCPCHK_EVAL_CONTINUE;
struct tcpcheck_send *send = &rule->send;
struct conn_stream *cs = check->cs;
- struct connection *conn = cs_conn(cs);
+ struct connection *conn = __cs_conn(cs);
struct buffer *tmp = NULL;
struct htx *htx = NULL;
int connection_hdr = 0;
enum tcpcheck_eval_ret tcpcheck_eval_recv(struct check *check, struct tcpcheck_rule *rule)
{
struct conn_stream *cs = check->cs;
- struct connection *conn = cs_conn(cs);
+ struct connection *conn = __cs_conn(cs);
enum tcpcheck_eval_ret ret = TCPCHK_EVAL_CONTINUE;
size_t max, read, cur_read = 0;
int is_empty;