static void syslog_io_handler(struct appctx *appctx)
{
static THREAD_LOCAL struct ist metadata[LOG_META_FIELDS];
- struct stconn *cs = appctx_cs(appctx);
- struct stream *s = __sc_strm(cs);
+ struct stconn *sc = appctx_cs(appctx);
+ struct stream *s = __sc_strm(sc);
struct proxy *frontend = strm_fe(s);
struct listener *l = strm_li(s);
struct buffer *buf = get_trash_chunk();
size_t size;
max_accept = l->maxaccept ? l->maxaccept : 1;
- while (co_data(sc_oc(cs))) {
+ while (co_data(sc_oc(sc))) {
char c;
if (max_accept <= 0)
goto missing_budget;
max_accept--;
- to_skip = co_getchar(sc_oc(cs), &c);
+ to_skip = co_getchar(sc_oc(sc), &c);
if (!to_skip)
goto missing_data;
else if (to_skip < 0)
/* rfc-6587, Non-Transparent-Framing: messages separated by
* a trailing LF or CR LF
*/
- to_skip = co_getline(sc_oc(cs), buf->area, buf->size);
+ to_skip = co_getline(sc_oc(sc), buf->area, buf->size);
if (!to_skip)
goto missing_data;
else if (to_skip < 0)
char *p = NULL;
int msglen;
- to_skip = co_getword(sc_oc(cs), buf->area, buf->size, ' ');
+ to_skip = co_getword(sc_oc(sc), buf->area, buf->size, ' ');
if (!to_skip)
goto missing_data;
else if (to_skip < 0)
if (msglen > buf->size)
goto parse_error;
- msglen = co_getblk(sc_oc(cs), buf->area, msglen, to_skip);
+ msglen = co_getblk(sc_oc(sc), buf->area, msglen, to_skip);
if (!msglen)
goto missing_data;
else if (msglen < 0)
else
goto parse_error;
- co_skip(sc_oc(cs), to_skip);
+ co_skip(sc_oc(sc), to_skip);
/* update counters */
_HA_ATOMIC_INC(&cum_log_messages);
missing_data:
/* we need more data to read */
- sc_oc(cs)->flags |= CF_READ_DONTWAIT;
+ sc_oc(sc)->flags |= CF_READ_DONTWAIT;
return;
_HA_ATOMIC_INC(&frontend->fe_counters.cli_aborts);
close:
- sc_shutw(cs);
- sc_shutr(cs);
+ sc_shutw(sc);
+ sc_shutr(sc);
- sc_ic(cs)->flags |= CF_READ_NULL;
+ sc_ic(sc)->flags |= CF_READ_NULL;
return;
}